31 May
2001
31 May
'01
12:46 p.m.
I use Numeric 20.0.0, Python 2.1, and RedHat 7.1 on a PC. Here is a small Python program: import Numeric a = Numeric.zeros((2,2), 'b') print a[0,0], type(a[0,0]) print a[0][0], type(a[0][0]) a = Numeric.zeros((2,2), 'i') print a[0,0], type(a[0,0]) print a[0][0], type(a[0][0]) a = Numeric.zeros((2,2), 'f') print a[0,0], type(a[0,0]) print a[0][0], type(a[0][0]) The output is: 0 <type 'array'> 0 <type 'int'> 0 <type 'array'> 0 <type 'int'> 0.0 <type 'array'> 0.0 <type 'float'> This can't be correct. "a[0,0]" and "a[0][0]" should have the same type. A quick check of my old Python code shows that this problem may have appeared since Numeric version 17. Thanks, Ed Jones
8563
Age (days ago)
8563
Last active (days ago)
0 comments
1 participants
participants (1)
-
Edward C. Jones