diff options
Diffstat (limited to 'numpy/core/records.py')
-rw-r--r-- | numpy/core/records.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/numpy/core/records.py b/numpy/core/records.py index e95be0e3f..c2f6c6965 100644 --- a/numpy/core/records.py +++ b/numpy/core/records.py @@ -374,7 +374,7 @@ class recarray(ndarray): See Also -------- - rec.fromrecords : Construct a record array from data. + core.records.fromrecords : Construct a record array from data. record : fundamental data-type for `recarray`. format_parser : determine a data-type from formats, names, titles. @@ -630,7 +630,7 @@ def fromarrays(arrayList, dtype=None, shape=None, formats=None, >>> x1[1]=34 >>> r.a array([1, 2, 3, 4]) - + >>> x1 = np.array([1, 2, 3, 4]) >>> x2 = np.array(['a', 'dd', 'xyz', '12']) >>> x3 = np.array([1.1, 2, 3,4]) @@ -911,7 +911,7 @@ def fromfile(fd, dtype=None, shape=None, offset=0, formats=None, shape = (shape,) if hasattr(fd, 'readinto'): - # GH issue 2504. fd supports io.RawIOBase or io.BufferedIOBase interface. + # GH issue 2504. fd supports io.RawIOBase or io.BufferedIOBase interface. # Example of fd: gzip, BytesIO, BufferedReader # file already opened ctx = contextlib_nullcontext(fd) @@ -958,7 +958,7 @@ def array(obj, dtype=None, shape=None, offset=0, strides=None, formats=None, """ Construct a record array from a wide-variety of objects. - A general-purpose record array constructor that dispatches to the + A general-purpose record array constructor that dispatches to the appropriate `recarray` creation function based on the inputs (see Notes). Parameters @@ -996,7 +996,7 @@ def array(obj, dtype=None, shape=None, offset=0, strides=None, formats=None, `obj` is a string, then call the `fromstring` constructor. If `obj` is a list or a tuple, then if the first object is an `~numpy.ndarray`, call `fromarrays`, otherwise call `fromrecords`. If `obj` is a - `~numpy.recarray`, then make a copy of the data in the recarray + `~numpy.recarray`, then make a copy of the data in the recarray (if ``copy=True``) and use the new formats, names, and titles. If `obj` is a file, then call `fromfile`. Finally, if obj is an `ndarray`, then return ``obj.view(recarray)``, making a copy of the data if ``copy=True``. |