summaryrefslogtreecommitdiff
path: root/numpy/lib/recfunctions.py
diff options
context:
space:
mode:
authorMatti Picus <matti.picus@gmail.com>2019-04-25 16:09:00 -0700
committerGitHub <noreply@github.com>2019-04-25 16:09:00 -0700
commit171a3e5811e43643788c20075be9ba52efb83b81 (patch)
tree2370d772ffb615bd4494a1c2da5d26a0bb520fd9 /numpy/lib/recfunctions.py
parent0c3d18f57c842047ae23383c2eae46a042faef5d (diff)
parent58c28d4fd1c54b455d19372f0c838fed5fc71fe4 (diff)
downloadnumpy-171a3e5811e43643788c20075be9ba52efb83b81.tar.gz
Merge pull request #13334 from eric-wieser/fix-1-field-unstructured
BUG: Fix structured_to_unstructured on single-field types
Diffstat (limited to 'numpy/lib/recfunctions.py')
-rw-r--r--numpy/lib/recfunctions.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/lib/recfunctions.py b/numpy/lib/recfunctions.py
index 5ff35f0bb..ccbcfad91 100644
--- a/numpy/lib/recfunctions.py
+++ b/numpy/lib/recfunctions.py
@@ -980,7 +980,7 @@ def structured_to_unstructured(arr, dtype=None, copy=False, casting='unsafe'):
arr = arr.astype(packed_fields, copy=copy, casting=casting)
# finally is it safe to view the packed fields as the unstructured type
- return arr.view((out_dtype, sum(counts)))
+ return arr.view((out_dtype, (sum(counts),)))
def _unstructured_to_structured_dispatcher(arr, dtype=None, names=None,
align=None, copy=None, casting=None):