Skip to content

Update percentile method parameter from interpolation to method - #1139

Merged
cliffburdick merged 1 commit into
mainfrom
cliffburdick-patch-1
Mar 13, 2026
Merged

Update percentile method parameter from interpolation to method#1139
cliffburdick merged 1 commit into
mainfrom
cliffburdick-patch-1

Conversation

@cliffburdick

Copy link
Copy Markdown
Collaborator

No description provided.

@cliffburdick

Copy link
Copy Markdown
Collaborator Author

/build

@greptile-apps

greptile-apps Bot commented Mar 12, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR updates the deprecated interpolation keyword argument in np.percentile() calls to the current method keyword argument across all 12 invocations in the test vector generator 00_reductions.py. This resolves a NumPy deprecation warning introduced in NumPy 1.22.0, where interpolation was renamed to method.

  • All 12 np.percentile() calls in percentile.run() are consistently updated from interpolation= to method=.
  • The method values ('linear', 'lower', 'higher') are identical — no functional change is introduced.
  • The change is isolated to the test vector generator and does not affect production code.

Confidence Score: 5/5

  • This PR is safe to merge — it is a clean, non-breaking deprecation fix with no logic changes.
  • The change is purely mechanical: renaming a deprecated parameter to its successor in 12 identical call sites. Values are unchanged, no new logic is introduced, and the update aligns with the NumPy 1.22+ API. No issues were found during review.
  • No files require special attention.

Important Files Changed

Filename Overview
test/test_vectors/generators/00_reductions.py Updates all 12 np.percentile() calls in the percentile.run() method from the deprecated interpolation= keyword argument to the current method= keyword argument introduced in NumPy 1.22. The method values ('linear', 'lower', 'higher') are unchanged, so behavior is fully preserved.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[percentile.run] --> B{For each array\nt1e and t1o}
    B --> C["np.percentile(arr, 50, method='linear')"]
    B --> D["np.percentile(arr, 80, method='linear')"]
    B --> E["np.percentile(arr, 50, method='lower')"]
    B --> F["np.percentile(arr, 80, method='lower')"]
    B --> G["np.percentile(arr, 50, method='higher')"]
    B --> H["np.percentile(arr, 80, method='higher')"]
    C --> I[Store result in self.res]
    D --> I
    E --> I
    F --> I
    G --> I
    H --> I
    I --> J[return self.res]
Loading

Last reviewed commit: 53306a1

@cliffburdick
cliffburdick merged commit 22e5247 into main Mar 13, 2026
1 check passed
@cliffburdick
cliffburdick deleted the cliffburdick-patch-1 branch March 13, 2026 15:52
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.

1 participant