summaryrefslogtreecommitdiff
path: root/numpy/lib/recfunctions.py
diff options
context:
space:
mode:
authorThomas Green <tomgreen66@hotmail.com>2021-12-08 11:57:10 +0000
committerGitHub <noreply@github.com>2021-12-08 11:57:10 +0000
commitdc766fc1abb546ab883f76ef4e405e99e9287ab6 (patch)
tree9e7c7748ba8bfbb2ba5224633b0725909712d2fa /numpy/lib/recfunctions.py
parent1cfdac82ac793061d8ca4b07c046fc6b21ee7e54 (diff)
parentab7a1927353ab9dd52e3f2f7a1a889ae790667b9 (diff)
downloadnumpy-dc766fc1abb546ab883f76ef4e405e99e9287ab6.tar.gz
Merge branch 'numpy:main' into armcompiler
Diffstat (limited to 'numpy/lib/recfunctions.py')
-rw-r--r--numpy/lib/recfunctions.py21
1 files changed, 12 insertions, 9 deletions
diff --git a/numpy/lib/recfunctions.py b/numpy/lib/recfunctions.py
index a491f612e..ee4fbcd74 100644
--- a/numpy/lib/recfunctions.py
+++ b/numpy/lib/recfunctions.py
@@ -784,7 +784,8 @@ def repack_fields(a, align=False, recurse=False):
This method removes any overlaps and reorders the fields in memory so they
have increasing byte offsets, and adds or removes padding bytes depending
- on the `align` option, which behaves like the `align` option to `np.dtype`.
+ on the `align` option, which behaves like the `align` option to
+ `numpy.dtype`.
If `align=False`, this method produces a "packed" memory layout in which
each field starts at the byte the previous field ended, and any padding
@@ -917,11 +918,12 @@ def structured_to_unstructured(arr, dtype=None, copy=False, casting='unsafe'):
dtype : dtype, optional
The dtype of the output unstructured array.
copy : bool, optional
- See copy argument to `ndarray.astype`. If true, always return a copy.
- If false, and `dtype` requirements are satisfied, a view is returned.
+ See copy argument to `numpy.ndarray.astype`. If true, always return a
+ copy. If false, and `dtype` requirements are satisfied, a view is
+ returned.
casting : {'no', 'equiv', 'safe', 'same_kind', 'unsafe'}, optional
- See casting argument of `ndarray.astype`. Controls what kind of data
- casting may occur.
+ See casting argument of `numpy.ndarray.astype`. Controls what kind of
+ data casting may occur.
Returns
-------
@@ -1020,11 +1022,12 @@ def unstructured_to_structured(arr, dtype=None, names=None, align=False,
align : boolean, optional
Whether to create an aligned memory layout.
copy : bool, optional
- See copy argument to `ndarray.astype`. If true, always return a copy.
- If false, and `dtype` requirements are satisfied, a view is returned.
+ See copy argument to `numpy.ndarray.astype`. If true, always return a
+ copy. If false, and `dtype` requirements are satisfied, a view is
+ returned.
casting : {'no', 'equiv', 'safe', 'same_kind', 'unsafe'}, optional
- See casting argument of `ndarray.astype`. Controls what kind of data
- casting may occur.
+ See casting argument of `numpy.ndarray.astype`. Controls what kind of
+ data casting may occur.
Returns
-------