8000 Merge pull request #404 from certik/pr401_fix · numpy/numpy@fab65b7 · GitHub
[go: up one dir, main page]

Skip to content

Commit fab65b7

Browse files
committed
Merge pull request #404 from certik/pr401_fix
FIX: simplify the import statement
2 parents 84698e3 + 0086bbc commit fab65b7

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

numpy/core/_internal.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ def _newnames(datatype, order):
285285
# Given an array with fields and a sequence of field names
286286
# construct a new array with just those fields copied over
287287
def _index_fields(ary, fields):
288-
from multiarray import empty, dtype
288+
from multiarray import empty, dtype, array
289289
dt = ary.dtype
290290

291291
names = [name for name in fields if name in dt.names]
@@ -298,7 +298,6 @@ def _index_fields(ary, fields):
298298
# Return a copy for now until behavior is fully deprecated
299299
# in favor of returning view
300300
copy_dtype = {'names':view_dtype['names'], 'formats':view_dtype['formats']}
301-
from numpy import array
302301
return array(view, dtype=copy_dtype, copy=True)
303302

304303
# Given a string containing a PEP 3118 format specifier,

0 commit comments

Comments
 (0)
0