##// END OF EJS Templates
drop support for Numeric in %whos
MinRK -
Show More
@@ -861,7 +861,7 b' Currently the magic system has the following functions:\\n"""'
861 861 # for these types, show len() instead of data:
862 862 seq_types = ['dict', 'list', 'tuple']
863 863
864 # for numpy/Numeric arrays, display summary info
864 # for numpy arrays, display summary info
865 865 ndarray_type = None
866 866 if 'numpy' in sys.modules:
867 867 try:
@@ -871,15 +871,6 b' Currently the magic system has the following functions:\\n"""'
871 871 else:
872 872 ndarray_type = ndarray.__name__
873 873
874 array_type = None
875 if 'Numeric' in sys.modules:
876 try:
877 from Numeric import ArrayType
878 except ImportError:
879 pass
880 else:
881 array_type = ArrayType.__name__
882
883 874 # Find all variable names and types so we can figure out column sizes
884 875 def get_vars(i):
885 876 return self.shell.user_ns[i]
@@ -923,7 +914,7 b' Currently the magic system has the following functions:\\n"""'
923 914 print vformat.format(vname, vtype, varwidth=varwidth, typewidth=typewidth),
924 915 if vtype in seq_types:
925 916 print "n="+str(len(var))
926 elif vtype in [array_type,ndarray_type]:
917 elif vtype == ndarray_type:
927 918 vshape = str(var.shape).replace(',','').replace(' ','x')[1:-1]
928 919 if vtype==ndarray_type:
929 920 # numpy
General Comments 0
You need to be logged in to leave comments. Login now