On Fri, Feb 1, 2013 at 6:24 AM, denis <denis-bz...@t-online.de> wrote:
> Folks, > is there a way to speed up Array.take( floatindices.astype(int) ) ? > astype(int) makes a copy, floor() returns floats. > > (Is there a wiki of NumPy one-liners / various tricks ? > would sure beat googling.) > You can use floats for the indices in the take method, they are floored before use. That said, the Fortran FLOOR function returns integers and it would be useful if numpy had integer versions of floor, ceil, divmod, say, ifloor, iceil, idivmod that raised errors if the resulting integers overflowed. Chuck
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion