[Numpy-discussion] Empty arrays strange behaviour

Alan G Isaac aisaac at american.edu
Wed Aug 18 08:15:11 CDT 2004


>> I'd say we should go with compatibility.
>> Todd


Script:
a=[[i+i*j for i in range(5)]for j in range(4)]
print a[2:4][5:7]
import Numeric
b=Numeric.array(a)
print b[2:4,5:7]
import numarray
c=numarray.array(a)
print c[2:4,5:7]

Output:
[]
zeros((2, 0), 'l')
[]

fwiw,
Alan Isaac






More information about the Numpy-discussion mailing list