[Numpy-discussion] is it a bug?

shuwj5460@16... shuwj5460@16...
Wed Mar 11 19:55:13 CDT 2009


Hi,

import numpy as np
x = np.arange(30)
x.shape = (2,3,5)

idx = np.array([0,1])
e = x[0,idx,:]
print e.shape       
#----> return (2,5). ok.

idx = np.array([0,1])
e = x[0,:,idx]
print e.shape      

#-----> return (2,3). I think the right answer should be (3,2). Is
#       it a bug here? my numpy version is 1.2.1.


Regards

David
-- 
 <>




More information about the Numpy-discussion mailing list