inaos / iron-array

2 stars 0 forks source link

Try to follow the Python array API standard #411

Open FrancescAlted opened 3 years ago

FrancescAlted commented 3 years ago

The Python array API standard is a nascent effort to make Python interfaces implementing array/tensors to follow the same API. The website of the standard is here:

https://data-apis.org/array-api/latest/index.html

Our ironArray for Python should try to adhere to this standard as much as possible. In particular, our dtshape violates the standard and ti would be better to split it in dtype and shape. Unfortunately, the shape is not mandatory in the standard, but for us, it must be; however, adding a new mandatory argument is not as bad as introducing an incompatible one (e.g. dtype vs dtshape).

Besides, the standard advocates for a data interchange protocol and suggest the DLPack as the best candidate for that. We should try to adopt it, and provide a fast path for our plainbuffer interface.