logo       

Re[2]: Empty arrays strange behaviour: msg#00056

python.numeric.general

Subject: Re[2]: Empty arrays strange behaviour

>> 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




-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise