[Numpy-discussion] numpy.trapz() doesn't respect subclass

josef.pktd at gmail.com josef.pktd at gmail.com
Mon Mar 22 00:57:16 EDT 2010


On Mon, Mar 22, 2010 at 12:49 AM, Ryan May <rmay31 at gmail.com> wrote:
> Hi,
>
> I found that trapz() doesn't work with subclasses:
>
> http://projects.scipy.org/numpy/ticket/1438
>
> A simple patch (attached) to change asarray() to asanyarray() fixes
> the problem fine.

Are you sure this function works with matrices and other subclasses?

Looking only very briefly at it: the multiplication might be a problem.

Josef


>
> Ryan
>
> --
> Ryan May
> Graduate Research Assistant
> School of Meteorology
> University of Oklahoma
>
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion at scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>
>



More information about the NumPy-Discussion mailing list