diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2018-12-15 10:59:43 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-15 10:59:43 -0800 |
commit | 4940a60b301710cdfaed1e79d207138e8e74cb61 (patch) | |
tree | 2f4cea4c0abdcb1704d56d7746232138af057e81 /numpy/doc/structured_arrays.py | |
parent | e26c2990c4828d6f7f2f588d75cd01eecafd53f3 (diff) | |
parent | 2981ed622501ac48c54c4efdf06a84084b70ff66 (diff) | |
download | numpy-4940a60b301710cdfaed1e79d207138e8e74cb61.tar.gz |
Merge pull request #12554 from ahaldane/further_struct_doc_fixes
DOC: more doc updates for structured arrays
Diffstat (limited to 'numpy/doc/structured_arrays.py')
-rw-r--r-- | numpy/doc/structured_arrays.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/numpy/doc/structured_arrays.py b/numpy/doc/structured_arrays.py index 0fcdecf00..e92a06124 100644 --- a/numpy/doc/structured_arrays.py +++ b/numpy/doc/structured_arrays.py @@ -397,6 +397,15 @@ typically a non-structured array, except in the case of nested structures. >>> y.dtype, y.shape, y.strides (dtype('float32'), (2,), (12,)) +If the accessed field is a subarray, the dimensions of the subarray +are appended to the shape of the result:: + + >>> x = np.zeros((2,2), dtype=[('a', np.int32), ('b', np.float64, (3,3))]) + >>> x['a'].shape + (2, 2) + >>> x['b'].shape + (2, 2, 3, 3) + Accessing Multiple Fields ``````````````````````````` |