summaryrefslogtreecommitdiff
path: root/numpy/ma
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2013-02-28 19:34:59 -0800
committerCharles Harris <charlesr.harris@gmail.com>2013-02-28 19:34:59 -0800
commit48df79673f81a8421421233e26f663f260bcebfd (patch)
tree1fd3d59cdc7f9c10d09bc114fee0338b68718bb4 /numpy/ma
parent5ce8e28a97210fac9f244e79c186433cd373999d (diff)
parent83e39633d94ddca717ae50692b013ae7ffc39459 (diff)
downloadnumpy-48df79673f81a8421421233e26f663f260bcebfd.tar.gz
Merge pull request #2967 from sbyrnes321/master
DOC -- add another paragraph note to ndarray.view docs
Diffstat (limited to 'numpy/ma')
-rw-r--r--numpy/ma/core.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/numpy/ma/core.py b/numpy/ma/core.py
index 861ca268d..cfaa63c8a 100644
--- a/numpy/ma/core.py
+++ b/numpy/ma/core.py
@@ -2889,6 +2889,15 @@ class MaskedArray(ndarray):
`dtype` is an ndarray sub-class), then the fill value is preserved.
Finally, if `fill_value` is specified, but `dtype` is not, the fill
value is set to the specified value.
+
+ 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.
"""
if dtype is None: