1.0rc2 strange repeat behavior

Mike Rovner mrovner at cadence.com
Tue Oct 17 19:30:12 CDT 2006


Hi,

I got strange discrepance between 2.4+0.9.8 and 2.5+1.0rc2:

model_lib_pool %0 !5019$ python2.5
Python 2.5 (r25:51908, Oct 17 2006, 16:16:21)
[GCC 3.2.3 20030502 (Red Hat Linux 3.2.3-14)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
f>>> from numpy import *
 >>> a=arange(12).reshape(4,3)
 >>> a
array([[ 0,  1,  2],
        [ 3,  4,  5],
        [ 6,  7,  8],
        [ 9, 10, 11]])
 >>> a[:,2]
array([ 2,  5,  8, 11])
 >>> a[:,2].repeat(3)
array([2, 2, 2, 3, 3, 3, 4, 4, 4, 5, 5, 5])
 >>> import numpy
 >>> numpy.__version__
'1.0rc2'
 >>>

Old version looks right:

Python 2.4.2 (#5, Jun  2 2006, 18:33:20)
[GCC 3.2.3 20030502 (Red Hat Linux 3.2.3-20)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
 >>> from numpy import *
 >>> a=arange(12).reshape(4,3)
 >>> a
array([[ 0,  1,  2],
        [ 3,  4,  5],
        [ 6,  7,  8],
        [ 9, 10, 11]])
 >>> a[:,2]
array([ 2,  5,  8, 11])
 >>> a[:,2].repeat(3)
array([ 2,  2,  2,  5,  5,  5,  8,  8,  8, 11, 11, 11])
 >>> import numpy
 >>> numpy.__version__
'0.9.8'
 >>>

Thanks,
Mike


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642




More information about the Numpy-discussion mailing list