summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTravis Oliphant <oliphant@enthought.com>2007-05-09 16:27:06 +0000
committerTravis Oliphant <oliphant@enthought.com>2007-05-09 16:27:06 +0000
commitde17a87fcd3dab5385344d09f7197450faae3e58 (patch)
tree267ccdd2bdefcf9ce4931884697810039c0629c3
parent140887c5ba2871b9dc3425f1d1b737df85f97fea (diff)
downloadnumpy-de17a87fcd3dab5385344d09f7197450faae3e58.tar.gz
Change recarray attribute getting to return a view using the class instead of pure recarray when fields are present.
-rw-r--r--numpy/core/records.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/core/records.py b/numpy/core/records.py
index f0e9f5fa8..5fe43a173 100644
--- a/numpy/core/records.py
+++ b/numpy/core/records.py
@@ -136,7 +136,7 @@ class record(nt.void):
# if it's a string return 'SU' return a chararray
# otherwise return a normal array
if obj.dtype.fields:
- return obj.view(recarray)
+ return obj.view(obj.__class__)
if obj.dtype.char in 'SU':
return obj.view(chararray)
return obj