NumPy 2 is coming: preventing breakage, updating your code

date: 2024-01-16 · Tags: #python, #dev, #news

Python Speed posts an article1 about the upcoming NumPy 2.0 release. It shows the new features and changes that are coming in the next major release of NumPy.

Then I realize that the NumPy 2.0 is almost here. I'm excited to see that.

The article and offical migration guide23 is a good start if you are a library developer with NumPy or using NumPy in your projects.

Check the numpy/numpy issue #243004 for the latest updates on the development status and announcements.

Footnotes

  1. NumPy 2 is coming: preventing breakage, updating your code

  2. NumPy 2.0 migration guide

  3. NumPy 2.0.0 Release Notes

  4. NumPy 2.0 development status & announcements #24300

SIMD in Pure Python

date: 2024-01-13 · Tags: #python, #simd, #good-reading
  1. Python Has infinite precision integers (Python also has a bytearray type)
  2. Python has bitwise operation (&, |, ^, ~, <<, >>)
  3. Leverage compiler optimizations (CPython compiles your code into a bytecode format)

That's enough to implement simple SIMD operations in pure Python.

Awesome!

References:

Representing SHA-256 Hashes As Avatars

date: 2024-01-09 · Tags: #reading, #ideas

Awesome idea to represent SHA-256 hashes as avatars.

Examples:

The above SVG represents the SHA-256 hash of the string "Hello, world!" (in hexadecimal) as an avatar. The hash is:

315f5bdb76d078c43b8ac0064e4a0164612b1fce77c869345bfc94c75894edd3

Super cool :lol

Refs: