While using the C API to work with Numpy arrays, I came across some 
inconsistencies regarding the return of a success state from various Numpy 
functions. For example, the array iterator functions return either NPY_SUCCEED 
(defined as 1) or NPY_FAIL (defined as 0) to indicate whether the function 
successfully finished. However, various of the array functions return -1 on 
success and 0 on failure. The result is similar enough, but I would think it 
more consistent to use NPY_SUCCEED/NPY_FAIL everywhere. As an example, consider 
the documentation pages for the Array API:
https://numpy.org/doc/stable/reference/c-api/array.html
and the Array iterator API:
https://numpy.org/doc/stable/reference/c-api/iterator.html#array-iterator-api

I hope this is the right place to place this. It is the first time I really 
publicly engage with this kind of thing. This did not seem like a bug and the 
Github page indicated that feature requests should go to the mailing list first.
_______________________________________________
NumPy-Discussion mailing list -- numpy-discussion@python.org
To unsubscribe send an email to numpy-discussion-le...@python.org
https://mail.python.org/mailman3/lists/numpy-discussion.python.org/
Member address: arch...@mail-archive.com

Reply via email to