Skip to content

Add limit_output option to XArray bilinear resampler#701

Open
Zaczero wants to merge 1 commit intopytroll:mainfrom
Zaczero:zaczero/limit_output
Open

Add limit_output option to XArray bilinear resampler#701
Zaczero wants to merge 1 commit intopytroll:mainfrom
Zaczero:zaczero/limit_output

Conversation

@Zaczero
Copy link
Contributor

@Zaczero Zaczero commented Feb 28, 2026

  - limit_output=True: mean 0.937s, median 0.925s (n=24)
  - limit_output=False: mean 0.614s, median 0.608s (n=24)
  - Delta: -0.323s, -34.45% mean time

In my case it's dead code, and disabling it reduces runtime by 35%.

  • Tests added
  • Tests passed

"""Initialize xarray bilinear resampler."""
super().__init__(source_geo_def, target_geo_def, radius_of_influence,
neighbours=neighbours, epsilon=epsilon, reduce_data=reduce_data)
self._limit_output = limit_output
Copy link
Member

Choose a reason for hiding this comment

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

I realize that it doesn't seem that the existing kwargs are documented (correct me if I'm wrong @pnuu), but could we get a description of the limit_output keyword argument added? I suppose that means documenting all the kwargs though doesn't it?

Copy link
Member

Choose a reason for hiding this comment

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

@codecov
Copy link

codecov bot commented Mar 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.68%. Comparing base (4da28b0) to head (ac9a582).
⚠️ Report is 32 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #701      +/-   ##
==========================================
+ Coverage   93.67%   93.68%   +0.01%     
==========================================
  Files          89       89              
  Lines       13621    13654      +33     
==========================================
+ Hits        12759    12792      +33     
  Misses        862      862              
Flag Coverage Δ
unittests 93.68% <100.00%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants