Skip to content

Trapz dx doesn't trigger array_function mechanism #5

Description

@mocquin

This is numpy-related issue : given the current interface, we can't do anything about this problem.
An issue is opened at numpy with a dummy example : numpy#18902

In the case of physipy :

from physipy import m
import numpy as np

arr = np.arange(10)
q = arr * m

# all these work
print(np.trapz(arr, arr, dx=0.5))
print(np.trapz(arr, q, dx=0.5))
print(np.trapz(arr, arr, dx=0.5*m))
print(np.trapz(arr, dx=0.5))
print(np.trapz(q, dx=0.5*m))

# but not this one 
print(np.trapz(arr, dx=0.5*m))

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    numpynumpy related

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions