Skip to content

Add xp.trapz - #4127

Merged
ajpotts merged 6 commits into
Bears-R-Us:masterfrom
ShreyasKhandekar:add-trapz
Mar 10, 2025
Merged

ajpotts merged 6 commits into
Bears-R-Us:masterfrom
ShreyasKhandekar:add-trapz

Conversation

@ShreyasKhandekar

@ShreyasKhandekar ShreyasKhandekar commented Feb 28, 2025 •

Copy link
Copy Markdown
Contributor

Resolves: #4129

Add trapz (or trapezoid) function in Arkouda using the functionality from the array API.

In the future the entirity of this function may be implemented purely in Chapel.

See https://numpy.org/doc/1.26/reference/generated/numpy.trapz.html#numpy.trapz for reference.

Technically, trapz is deprecated in numpy 2.0 onwards, but Arkouda still uses numpy 1.26. I've added both overloads.

Also added tests.

Comment thread tests/array_api/util_functions.py Resolved
Shreyas Khandekar added 6 commits March 3, 2025 13:06
Add trapz (or trapezoid) function in Arkouda using the functionality
from the array API.
In the future the entirity of this function may be implemented purely in
Chapel.

See https://numpy.org/doc/1.26/reference/generated/numpy.trapz.html#numpy.trapz

Signed-off-by: Shreyas Khandekar <[email protected]>
Signed-off-by: Shreyas Khandekar <[email protected]>
Same as `trapz`

Signed-off-by: Shreyas Khandekar <[email protected]>
Signed-off-by: Shreyas Khandekar <[email protected]>
Signed-off-by: Shreyas Khandekar <[email protected]>
@ajpotts
ajpotts added this pull request to the merge queue Mar 10, 2025
Merged via the queue into Bears-R-Us:master with commit 1548572 Mar 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add xp.trapz

3 participants