From 0086bbc0145b9e9612b299e0b36b4782160c9ce1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20=C4=8Cert=C3=ADk?= Date: Fri, 31 Aug 2012 14:46:26 -0700 Subject: [PATCH] FIX: simplify the import statement --- numpy/core/_internal.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/numpy/core/_internal.py b/numpy/core/_internal.py index fbe580deeab8..af08c50ed95c 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,