##// END OF EJS Templates
Make import checks more explicit in %whos...
MinRK -
Show More
@@ -862,18 +862,23 b' Currently the magic system has the following functions:\\n"""'
862 seq_types = ['dict', 'list', 'tuple']
862 seq_types = ['dict', 'list', 'tuple']
863
863
864 # for numpy/Numeric arrays, display summary info
864 # for numpy/Numeric arrays, display summary info
865 try:
865 ndarray_type = None
866 import numpy
866 if 'numpy' in sys.modules:
867 except ImportError:
867 try:
868 ndarray_type = None
868 from numpy import ndarray
869 else:
869 except ImportError:
870 ndarray_type = numpy.ndarray.__name__
870 pass
871 try:
871 else:
872 import Numeric
872 ndarray_type = ndarray.__name__
873 except ImportError:
873
874 array_type = None
874 array_type = None
875 else:
875 if 'Numeric' in sys.modules:
876 array_type = Numeric.ArrayType.__name__
876 try:
877 from Numeric import ArrayType
878 except ImportError:
879 pass
880 else:
881 array_type = ArrayType.__name__
877
882
878 # Find all variable names and types so we can figure out column sizes
883 # Find all variable names and types so we can figure out column sizes
879 def get_vars(i):
884 def get_vars(i):
General Comments 0
You need to be logged in to leave comments. Login now