While the buffer protocol support is a bit of a long term thing, and I suspect I won't manager to fix __array_interface__/np.save() for NumPy 2.5 :(, DLPack is now supported:
When available, np.dtypes.register_dlpack_dtype() allows to add mappings that NumPy will use when exporting or importing to dlpack (of course it doesn't allow overriding existing NumPy dtypes which simply take priority).
While the buffer protocol support is a bit of a long term thing, and I suspect I won't manager to fix
__array_interface__/np.save()for NumPy 2.5 :(, DLPack is now supported:When available,
np.dtypes.register_dlpack_dtype()allows to add mappings that NumPy will use when exporting or importing to dlpack (of course it doesn't allow overriding existing NumPy dtypes which simply take priority).