[Numpy-discussion] indexing bug?
Fri Sep 28 13:59:33 CDT 2007
Looks like it truncates to an int. But I wouldn't do
it especially if you use floating operations (+,*,/,
etc.) since what you get may not truncate to the
integer you expect. Remember floats are approximate
representations for many rational numbers. Stick with
--- Nadia Dencheva <firstname.lastname@example.org> wrote:
> Is indexing with floats really allowed in numpy?
> >>> a=numpy.array([1,2,3,4])
> >>> a[2.99]
-- Lou Pecora, my views are my own.
Be a better Globetrotter. Get better travel answers from someone who knows. Yahoo! Answers - Check it out.
More information about the Numpy-discussion