Skip to content

FIX: simplify the import statement #404

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 2, 2012
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions numpy/core/_internal.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand All @@ -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,
Expand Down