Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh-384: rename all internal functions to trapezoid over trapz #392

Merged
merged 191 commits into from
Nov 20, 2024

Conversation

paddyroddy
Copy link
Member

Closes #384. Blocked by #391.

Keeping in line with NumPy v2 renaming np.trap to np.trapezoid. It was agreed to change the internal name of functions to avoid potential confusion.

Base automatically changed from paddy/issue-163 to main November 18, 2024 09:24
@paddyroddy paddyroddy removed the blocked The issue or pull request is blocked by something label Nov 18, 2024
Copy link
Collaborator

@ntessore ntessore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe better to carry on agreeing with the scipy name, i.e., now cumulative_trapezoid?

@paddyroddy
Copy link
Member Author

Maybe better to carry on agreeing with the scipy name, i.e., now cumulative_trapezoid?

Sure. cumtrapezoid without the _ does seem a bit ugly.

Copy link
Member

@Saransh-cpp Saransh-cpp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This, @paddyroddy! Could you fix the git history?

@paddyroddy
Copy link
Member Author

This, @paddyroddy! Could you fix the git history?

We're squash merging... I don't see the benefit

@paddyroddy
Copy link
Member Author

This, @paddyroddy! Could you fix the git history?

For reference, this happened because the head was #391. I do think tidying this is a waste of dev time with squash merging enabled.

Copy link
Member

@Saransh-cpp Saransh-cpp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair enough, everything should be fine as long as the commit message of the squashed commit does not reflect this history.

Copy link
Collaborator

@ntessore ntessore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks!

I just realised that I thought we were testing the cumulative trapezoid by chopping the array down to 1, 2, 3, ... elements, not scipy. Maybe a change for the future to get rid of that dependency.

@paddyroddy paddyroddy merged commit 15e6847 into main Nov 20, 2024
16 checks passed
@paddyroddy paddyroddy deleted the paddy/issue-384 branch November 20, 2024 14:17
Saransh-cpp pushed a commit that referenced this pull request Nov 26, 2024
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api An (incompatible) API change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Change all functions with trapz in the name to trapezoid in line with NumPy v2
3 participants