From 1bd0b4e8f176cd80e81b5f50832db5f8ba1ee1e9 Mon Sep 17 00:00:00 2001 From: Allan Haldane Date: Fri, 16 Jan 2015 23:53:41 -0500 Subject: 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. --- numpy/add_newdocs.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'numpy/add_newdocs.py') diff --git a/numpy/add_newdocs.py b/numpy/add_newdocs.py index 73efdb6a9..66b889cc9 100644 --- a/numpy/add_newdocs.py +++ b/numpy/add_newdocs.py @@ -4629,7 +4629,7 @@ add_newdoc('numpy.core.multiarray', 'ndarray', ('view', >>> print x [(1, 20) (3, 4)] - Using a view to convert an array to a record array: + Using a view to convert an array to a recarray: >>> z = x.view(np.recarray) >>> z.a @@ -5875,17 +5875,18 @@ add_newdoc('numpy.core.multiarray', 'dtype', >>> np.dtype(np.int16) dtype('int16') - Record, one field name 'f1', containing int16: + Structured type, one field name 'f1', containing int16: >>> np.dtype([('f1', np.int16)]) dtype([('f1', '>> np.dtype([('f1', [('f1', np.int16)])]) dtype([('f1', [('f1', '>> np.dtype([('f1', np.uint), ('f2', np.int32)]) -- cgit v1.2.1