diff options
author | Steve <steve@steve-Inspiron14z.(none)> | 2013-02-05 10:07:42 -0500 |
---|---|---|
committer | Steve <steve@steve-Inspiron14z.(none)> | 2013-02-05 10:07:42 -0500 |
commit | c714dad734cedddd749cc7ddfd120c503e29016d (patch) | |
tree | c072dfca4f49d4f322b64b8fe82295d9f289b303 /numpy/add_newdocs.py | |
parent | 637dbd84d5b80d91aa2eecd950a0e509d44f112e (diff) | |
download | numpy-c714dad734cedddd749cc7ddfd120c503e29016d.tar.gz |
DOC -- add another paragraph note to ndarray.view docs (cont'd)
More detail: Views are only sensitive to under-the-hood storage when
the dtype storage size has changed.
Diffstat (limited to 'numpy/add_newdocs.py')
-rw-r--r-- | numpy/add_newdocs.py | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/numpy/add_newdocs.py b/numpy/add_newdocs.py index d1f6b3285..6be001f70 100644 --- a/numpy/add_newdocs.py +++ b/numpy/add_newdocs.py @@ -4460,11 +4460,14 @@ add_newdoc('numpy.core.multiarray', 'ndarray', ('view', (same shape, dtype, etc.) This does not cause a reinterpretation of the memory. - In cases when ``a.view(some_dtype)`` causes a reinterpretation of the - bytes of memory, its behavior cannot necessarily be predicted just from - the superficial appearance of ``a`` (shown by ``print(a)``). If ``a`` is - C-ordered versus fortran-ordered, versus defined as a transpose, versus - defined as a slice, etc., the view may give different results. + For ``a.view(some_dtype)``, if ``some_dtype`` has a different number of + bytes per entry than the previous dtype (for example, converting a + regular array to a structured array), then the behavior of the view + cannot be predicted just from the superficial appearance of ``a`` (shown + by ``print(a)``). It also depends on exactly how ``a`` is stored in + memory. Therefore if ``a`` is C-ordered versus fortran-ordered, versus + defined as a slice or transpose, etc., the view may give different + results. Examples |