Skip to content

force floating point math for shape calculations - #115

Merged
bmcfee merged 1 commit into
mainfrom
force-float-shape
Sep 13, 2022
Merged

bmcfee merged 1 commit into
mainfrom
force-float-shape

Conversation

@bmcfee

@bmcfee bmcfee commented Sep 13, 2022

Copy link
Copy Markdown
Owner

This PR force-casts sampling rates to be floating point values when calculating the output shape of the resampled array.

This is designed to circumvent numerical overflows that arise when sr_new is a fixed-precision integer (eg np.int16) for some reason. This didn't arise in our tests here, but did pop up over in librosa/librosa#1569

@codecov-commenter

codecov-commenter commented Sep 13, 2022 •

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 75.22%. Comparing base (9c9fa90) to head (69e42e8).
Report is 30 commits behind head on main.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #115   +/-   ##
=======================================
  Coverage   75.22%   75.22%           
=======================================
  Files           4        4           
  Lines         113      113           
=======================================
  Hits           85       85           
  Misses         28       28           
Flag Coverage Δ
unittests 75.22% <100.00%> (ø)

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.

@bmcfee
bmcfee merged commit a39554f into main Sep 13, 2022
@bmcfee
bmcfee deleted the force-float-shape branch September 13, 2022 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants