diff options
author | Sebastian Berg <sebastian@sipsolutions.net> | 2013-04-10 22:22:46 +0200 |
---|---|---|
committer | Sebastian Berg <sebastian@sipsolutions.net> | 2013-04-11 23:57:30 +0200 |
commit | 5cdf8410fc4d2ed05d22e6831023c40a30d9ebe7 (patch) | |
tree | e72f49dab02155a752d5f9d4352ed5bbbaf20674 /numpy/add_newdocs.py | |
parent | 5c8b89c5bec14727b1cfb710494e0889d8c6568a (diff) | |
download | numpy-5cdf8410fc4d2ed05d22e6831023c40a30d9ebe7.tar.gz |
DOC: Add NPY_RELAXED_STRIDES_DOCUMENTATION doc to ndarry.flags
Diffstat (limited to 'numpy/add_newdocs.py')
-rw-r--r-- | numpy/add_newdocs.py | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/numpy/add_newdocs.py b/numpy/add_newdocs.py index 24d4c2134..ae07f05da 100644 --- a/numpy/add_newdocs.py +++ b/numpy/add_newdocs.py @@ -2614,12 +2614,11 @@ add_newdoc('numpy.core.multiarray', 'ndarray', ('flags', created writeable view onto it.) Attempting to change a non-writeable array raises a RuntimeError exception. ALIGNED (A) - The data and strides are aligned appropriately for the hardware. + The data and all elements are aligned appropriately for the hardware. UPDATEIFCOPY (U) This array is a copy of some other array. When this array is deallocated, the base array will be updated with the contents of this array. - FNC F_CONTIGUOUS and not C_CONTIGUOUS. FORC @@ -2649,6 +2648,16 @@ add_newdoc('numpy.core.multiarray', 'ndarray', ('flags', or the ultimate owner of the memory exposes a writeable buffer interface or is a string. + Arrays can be both C-style and Fortran-style contiguous simultaneously. + This is clear for 1-dimensional arrays, but can also be true for higher + dimensional arrays. + + Even for contiguous arrays a stride for a given dimension + ``arr.strides[dim]`` may be *arbitrary* if ``arr.shape[dim] == 1`` + or the array has no elements. + It does *not* generally hold that ``self.strides[-1] == self.itemsize`` + for C-style contiguous arrays or ``self.strides[0] == self.itemsize`` for + Fortran-style contiguous arrays is true. """)) |