##// END OF EJS Templates
Merge branch 'issue-31'...
Thomas Kluyver -
r3460:11e30b27 merge
parent child Browse files
Show More
@@ -25,7 +25,6 b' import shutil'
25 25 import re
26 26 import time
27 27 import textwrap
28 import types
29 28 from cStringIO import StringIO
30 29 from getopt import getopt,GetoptError
31 30 from pprint import pformat
@@ -834,7 +833,7 b' Currently the magic system has the following functions:\\n"""'
834 833
835 834 - For {},[],(): their length.
836 835
837 - For numpy and Numeric arrays, a summary with shape, number of
836 - For numpy arrays, a summary with shape, number of
838 837 elements, typecode and size in memory.
839 838
840 839 - Everything else: a string representation, snipping their middle if
@@ -867,7 +866,7 b' Currently the magic system has the following functions:\\n"""'
867 866 # if we have variables, move on...
868 867
869 868 # for these types, show len() instead of data:
870 seq_types = [types.DictType,types.ListType,types.TupleType]
869 seq_types = ['dict', 'list', 'tuple']
871 870
872 871 # for numpy/Numeric arrays, display summary info
873 872 try:
@@ -926,7 +925,7 b' Currently the magic system has the following functions:\\n"""'
926 925 for vname,var,vtype in zip(varnames,varlist,typelist):
927 926 print itpl(vformat),
928 927 if vtype in seq_types:
929 print len(var)
928 print "n="+str(len(var))
930 929 elif vtype in [array_type,ndarray_type]:
931 930 vshape = str(var.shape).replace(',','').replace(' ','x')[1:-1]
932 931 if vtype==ndarray_type:
General Comments 0
You need to be logged in to leave comments. Login now