[Numpy-discussion] flags attribute of ndarrays`
Jaime Fernández del Río
jaime.frio at gmail.com
Thu Mar 26 03:51:21 EDT 2015
Hi,
I have just submitted a longish issue on the github repo, #5721
<https://github.com/numpy/numpy/issues/5721>. After going in quite some
detail over the flags attribute of ndarray's I have found several
inconsistencies with the C API, and would like to make some changes. The
details are in gh, but as a high level summary:
1. arr.flags.farray is almost certainly broken, and returns some useless
result. I would like to make it behave like the C API's PyArray_ISFARRAY,
even though that doesn't seem to be the intention of the original coder.
2. arr.flags.fortran is inconsitent with the C API's PyArray_ISFORTRAN.
I think it should be modified to match it, but understand this may be too
much of a backwards compatibility breach.
3. I would like for `arr.flags` to truly behave as a mutable property of
`arr`. An explanation can be found on another thread's discussion with
Benjamin Root earlier today.
4. I would like to match the Python and C version's of these as much as
possible, and avoid future deviation, by actually using the C versions in
the Python ones, even if this may introduce subtle behavior changes.
Feedback is very welcome.
Jaime
--
(\__/)
( O.o)
( > <) Este es Conejo. Copia a Conejo en tu firma y ayúdale en sus planes
de dominación mundial.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20150326/ce4b2c7a/attachment.html>
More information about the NumPy-Discussion
mailing list