2 min

Tags in this article

, , ,

The release also marks the complete annotation of the main NumPy namespace

The NumPy team has announced the release version 1.22 of the scientific computing library. And according to reporting on devclass.com, this release is the first to be able to work with windows/arm64 targets.

Amongst other things, the new version allows developers to compute the number of 1-bits in an integer through the new bit_count function, use comment blocks to generate C/C++ API reference documentation, and keep the dimensions of reduced axes when using argmin and argmax in combination with new keepdims argument.

Solving the problem of degradations using regular memory

The latest iteration also quenches some more particular needs, by providing things like an option to configure allocators for data segments of a ndarray, which has been included to help realise hardware-specific optimisations. Theis is because teams were running into performance degradations using the regular memory management strategy. Still, devclass.com believes most regular users will probably keep accepting the bottleneck for the sake of simplicity.

There is also something for developers who like to get in on new additions early. They can take a look at the initial implementation of an enhancement proposal . This proposal seeks to support the Python array API standard. The feature is, however, still experimental. It allows users to make sure their code is portable and works with a variety of other multidimensional array libraries such as TensorFlow and PyTorch. There’s also a new header (experimental_public_dtype_api.h) available to facilitate investigations into the upcoming APIs for user DType support and universal functions. 

NumPy 1.22 also marks the complete annotation of the main NumPy namespace. This is a process that started in the runup to the 1.20 release last year. Other sub-packages that have since been fitted with annotations include numpy.testing, and numpy.linalg.

There are some things to consider before updating, according to devclass.com. Developers should be aware that passing boolean kth values to numpy.partition and numpy.argpartition isn’t an option anymore and that previously deprecated loads, ndfromtxt, and mafromtxt have been removed for good in v1.22.