diff options
author | jayvius <jay.bourque@continuum.io> | 2012-07-12 13:39:19 -0500 |
---|---|---|
committer | Jay Bourque <jay.bourque@continuum.io> | 2012-07-17 16:05:10 -0500 |
commit | a32325d1d5fc5e23622db5027a6dd35d42193e95 (patch) | |
tree | bf9e4acf64348f7ccf3232aa0a273838e4b6d572 /numpy/core/_internal.py | |
parent | 91cb088047bd357a1b266fa8cb9d0deefea5820c (diff) | |
download | numpy-a32325d1d5fc5e23622db5027a6dd35d42193e95.tar.gz |
Call view object's copy method
Diffstat (limited to 'numpy/core/_internal.py')
-rw-r--r-- | numpy/core/_internal.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/numpy/core/_internal.py b/numpy/core/_internal.py index 88a41fd0d..92ab0c8b0 100644 --- a/numpy/core/_internal.py +++ b/numpy/core/_internal.py @@ -286,7 +286,6 @@ def _newnames(datatype, order): # construct a new array with just those fields copied over def _index_fields(ary, fields): from multiarray import empty, dtype - from numpy import copy dt = ary.dtype names = [name for name in fields if name in dt.names] @@ -296,7 +295,7 @@ def _index_fields(ary, fields): view_dtype = {'names':names, 'formats':formats, 'offsets':offsets, 'itemsize':dt.itemsize} view = ary.view(dtype=view_dtype) - return copy(view) + return view.copy() # Given a string containing a PEP 3118 format specifier, # construct a Numpy dtype |