diff options
author | Allan Haldane <allan.haldane@gmail.com> | 2015-01-16 23:53:41 -0500 |
---|---|---|
committer | Allan Haldane <allan.haldane@gmail.com> | 2015-01-22 17:36:43 -0500 |
commit | 1bd0b4e8f176cd80e81b5f50832db5f8ba1ee1e9 (patch) | |
tree | fce876400e049c7927cfe4b62ee4d1ca00a8ed7b /numpy/doc/glossary.py | |
parent | b69035e8ea28bd759b929822aaba544d3c5f8c30 (diff) | |
download | numpy-1bd0b4e8f176cd80e81b5f50832db5f8ba1ee1e9.tar.gz |
DOC: improve record/structured array nomenclature & guide
This update adds a section better describing record arrays in the user
guide (numpy/doc/structured_arrays.py).
It also corrects nomenclature, such that "structured array" refers to
ndarrays with structured dtype, "record array" refers to modified
ndarrays as created by np.rec.array, and "recarray" refers to ndarrays
viewed as np.recarray. See the note at the end of the structured
array user guide.
Diffstat (limited to 'numpy/doc/glossary.py')
-rw-r--r-- | numpy/doc/glossary.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/numpy/doc/glossary.py b/numpy/doc/glossary.py index 3770f5761..f856a742b 100644 --- a/numpy/doc/glossary.py +++ b/numpy/doc/glossary.py @@ -284,7 +284,12 @@ Glossary ndarray See *array*. - + + record array + An `ndarray`_ with `structured data type`_ which has been subclassed as + np.recarray and whose dtype is of type np.record, making the + fields of its data type to be accessible by attribute. + reference If ``a`` is a reference to ``b``, then ``(a is b) == True``. Therefore, ``a`` and ``b`` are different names for the same Python object. @@ -345,7 +350,10 @@ Glossary >>> x[:, 1] array([2, 4]) - + + structured data type + A data type composed of other datatypes + tuple A sequence that may contain a variable number of types of any kind. A tuple is immutable, i.e., once constructed it cannot be |