>
> On Wed, Mar 11, 2009 at 19:55, shuwj5...@163.com wrote:
> > 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
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 num
hi,
I read the doc for numpy about round function:
-
For values exactly halfway between rounded decimal values, Numpy rounds
to the nearest even value. Thus 1.5 and 2.5 round to 2.0, -0.5 and 0.5
round to 0.0, etc. Results may also be surprising due to the inexact
representation of decimal fr