summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
authorOndřej Čertík <ondrej.certik@gmail.com>2012-09-02 09:33:40 -0700
committerOndřej Čertík <ondrej.certik@gmail.com>2012-09-02 09:33:40 -0700
commitfab65b74554c4a6118707167dedbfcec630f7a2a (patch)
tree5ee9df78f9b9b78e2be6c47151cca20719905f0c /numpy
parent84698e3e0f4c60c39ea778a3c0aada9d76b5f93a (diff)
parent0086bbc0145b9e9612b299e0b36b4782160c9ce1 (diff)
downloadnumpy-fab65b74554c4a6118707167dedbfcec630f7a2a.tar.gz
Merge pull request #404 from certik/pr401_fix
FIX: simplify the import statement
Diffstat (limited to 'numpy')
-rw-r--r--numpy/core/_internal.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/numpy/core/_internal.py b/numpy/core/_internal.py
index fbe580dee..af08c50ed 100644
--- a/numpy/core/_internal.py
+++ b/numpy/core/_internal.py
@@ -285,7 +285,7 @@ def _newnames(datatype, order):
# Given an array with fields and a sequence of field names
# construct a new array with just those fields copied over
def _index_fields(ary, fields):
- from multiarray import empty, dtype
+ from multiarray import empty, dtype, array
dt = ary.dtype
names = [name for name in fields if name in dt.names]
@@ -298,7 +298,6 @@ def _index_fields(ary, fields):
# Return a copy for now until behavior is fully deprecated
# in favor of returning view
copy_dtype = {'names':view_dtype['names'], 'formats':view_dtype['formats']}
- from numpy import array
return array(view, dtype=copy_dtype, copy=True)
# Given a string containing a PEP 3118 format specifier,