jax-ml / ml_dtypes

A stand-alone implementation of several NumPy dtype extensions used in machine learning.
Apache License 2.0
191 stars 25 forks source link

Fix invalid type registrations under NumPy 2.0. #137

Closed hawkinsp closed 6 months ago

hawkinsp commented 6 months ago

The code was copying a PyArray_Descr object by value, which confused NumPy and meant we ended up with two unrelated type objects, notably one of which had an invalid hash.