Permalink
Browse files

drop support for Numeric in %whos

  • Loading branch information...
1 parent 8719351 commit 9f2252c5a96861a83865fc4912a7acea1d4e6b19 @minrk committed Oct 20, 2011
Showing with 2 additions and 11 deletions.
  1. +2 −11 IPython/core/magic.py
View
@@ -861,7 +861,7 @@ def magic_whos(self, parameter_s=''):
# for these types, show len() instead of data:
seq_types = ['dict', 'list', 'tuple']
- # for numpy/Numeric arrays, display summary info
+ # for numpy arrays, display summary info
ndarray_type = None
if 'numpy' in sys.modules:
try:
@@ -871,15 +871,6 @@ def magic_whos(self, parameter_s=''):
else:
ndarray_type = ndarray.__name__
- array_type = None
- if 'Numeric' in sys.modules:
- try:
- from Numeric import ArrayType
- except ImportError:
- pass
- else:
- array_type = ArrayType.__name__
-
# Find all variable names and types so we can figure out column sizes
def get_vars(i):
return self.shell.user_ns[i]
@@ -923,7 +914,7 @@ def type_name(v):
print vformat.format(vname, vtype, varwidth=varwidth, typewidth=typewidth),
if vtype in seq_types:
print "n="+str(len(var))
- elif vtype in [array_type,ndarray_type]:
+ elif vtype == ndarray_type:
vshape = str(var.shape).replace(',','').replace(' ','x')[1:-1]
if vtype==ndarray_type:
# numpy

0 comments on commit 9f2252c

Please sign in to comment.