Skip to content

Replace np.trapz with np.trapezoid - #750

Merged
krzywon merged 2 commits into
masterfrom
fix-trapezoid
Aug 21, 2026
Merged

Replace np.trapz with np.trapezoid#750
krzywon merged 2 commits into
masterfrom
fix-trapezoid

Conversation

@pkienzle

Copy link
Copy Markdown
Contributor

np.trapz was removed in 2.4.0. The replacement, np.trapezoid, is in all currently supported versions of numpy, so we don't need to guard the import statements.

Most instances are in comments or exploratory code.

The only active code which uses trapezoid is in the Slit2D resolution function for oriented samples measured with slit geometry. This is only available when using sasmodels directly. SasView does not support USANS/USAXS measurements on oriented samples.

@codescene-access codescene-access Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Our agent can fix these. Install it.

No quality gates enabled for this code.

Quality Gate Profile: Custom Configuration
Install CodeScene MCP: safeguard and uplift AI-generated code. Catch issues early with our IDE extension and CLI tool.

@krzywon krzywon left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

A quick grep says you caught all np.trapz incidences. Looks good

@krzywon
krzywon merged commit 20eddd6 into master Aug 21, 2026
27 checks passed
@krzywon
krzywon deleted the fix-trapezoid branch August 21, 2026 13:35
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.

2 participants