diff options
author | Pauli Virtanen <pav@iki.fi> | 2009-12-06 12:07:06 +0000 |
---|---|---|
committer | Pauli Virtanen <pav@iki.fi> | 2009-12-06 12:07:06 +0000 |
commit | 026e0d2910ac89220ee7554debbf5fdaec5e621f (patch) | |
tree | cefa2d7c88195c949565328cc34b03ea97f90814 /numpy/core/arrayprint.py | |
parent | bbdeda175356c0d3d03b25db90149caa097dcb11 (diff) | |
download | numpy-026e0d2910ac89220ee7554debbf5fdaec5e621f.tar.gz |
3K: core: work around some cyclic imports
Diffstat (limited to 'numpy/core/arrayprint.py')
-rw-r--r-- | numpy/core/arrayprint.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/numpy/core/arrayprint.py b/numpy/core/arrayprint.py index fb83af3fb..c8d4e13f7 100644 --- a/numpy/core/arrayprint.py +++ b/numpy/core/arrayprint.py @@ -13,7 +13,6 @@ __docformat__ = 'restructuredtext' # and by Travis Oliphant 2005-8-22 for numpy import sys -import numeric as _nc import numerictypes as _nt from umath import maximum, minimum, absolute, not_equal, isnan, isinf from multiarray import format_longfloat @@ -142,6 +141,7 @@ def get_printoptions(): return d def _leading_trailing(a): + import numeric as _nc if a.ndim == 1: if len(a) > 2*_summaryEdgeItems: b = _nc.concatenate((a[:_summaryEdgeItems], @@ -224,6 +224,7 @@ def _array2string(a, max_line_width, precision, suppress_small, separator=' ', return lst def _convert_arrays(obj): + import numeric as _nc newtup = [] for k in obj: if isinstance(k, _nc.ndarray): @@ -386,6 +387,7 @@ class FloatFormat(object): self.fillFormat(data) def fillFormat(self, data): + import numeric as _nc errstate = _nc.seterr(all='ignore') try: special = isnan(data) | isinf(data) |