[Numpy-discussion] Only integer scalar arrays can be converted to a scalar index

Robert Kern robert.kern at gmail.com
Fri Sep 15 22:33:40 EDT 2017

On Sat, Sep 16, 2017 at 7:16 AM, Chris Barker - NOAA Federal <
chris.barker at noaa.gov> wrote:
> No thoughts on optimizing memory, but that indexing error probably comes
from np.mean producing float results. An astype call shoulder that work.

Why? It's not being used as an index. It's being assigned into a float

Rather, it's the slicing inside of `trace_block()` when it's being given
arrays as inputs for `x` and `y`. numpy simply doesn't support that because
in general the result wouldn't have a uniform shape.

Robert Kern
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20170916/7ec818b6/attachment.html>

More information about the NumPy-Discussion mailing list