On Mon, Feb 22, 2021 at 7:49 PM Sebastian Berg <sebast...@sipsolutions.net> wrote:
> On Sun, 2021-02-21 at 17:30 +0100, Ralf Gommers wrote: > > Hi all, > > > > Here is a NEP, written together with Stephan Hoyer and Aaron Meurer, > > for > > discussion on adoption of the array API standard ( > > https://data-apis.github.io/array-api/latest/). This will add a new > > numpy.array_api submodule containing that standardized API. The main > > purpose of this API is to be able to write code that is portable to > > other > > array/tensor libraries like CuPy, PyTorch, JAX, TensorFlow, Dask, and > > MXNet. > > > > We expect this NEP to remain in draft state for quite a while, while > > we're > > gaining experience with using it in downstream libraries, discuss > > adding it > > to other array libraries, and finishing some of the loose ends (e.g., > > specifications for linear algebra functions that aren't merged yet, > > see > > https://github.com/data-apis/array-api/pulls) in the API standard > > itself. > > > There is too much to unpack in a day, I hope I did not miss something > particularly important while reading. > Do you have plans to try some of this outside of NumPy, or maybe make a > repo in the numpy org for it? > Sorry, I forgot to answer this question. That is what we're doing now, the current prototype is at https://github.com/data-apis/numpy/tree/array-api/numpy/_array_api. I do expect that as soon we need any changes in C code, that becomes impractical. I think merging as a private submodule (numpy._array_api) makes sense. That will help with WIP PRs to other libraries - then we can use the "test against master" CI for that, rather than having to make a mess injecting things inside CI. Also, there are a few parts of the NEP that are improvements outside of the new submodule. Not only DLPack, but also consistency in "stacks of matrices" in linalg functions, adding a missing keepdims keyword, the never-copy mode for asarray, and improving the API for inspecting dtype families (https://github.com/numpy/numpy/issues/17325). Those things can all be pushed forward. Cheers, Ralf
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@python.org https://mail.python.org/mailman/listinfo/numpy-discussion