iver56 / audiomentations

A Python library for audio data augmentation. Inspired by albumentations. Useful for machine learning.
https://iver56.github.io/audiomentations/
MIT License
1.76k stars 183 forks source link

Optimize max abs calculations in terms of memory and speed #308

Closed iver56 closed 7 months ago

iver56 commented 7 months ago

This way of computing the minmax is roughly 3x faster and uses less memory because it doesn't allocate memory for a new audio ndarray

codecov[bot] commented 7 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (dcfa697) 94.58% compared to head (a8e5475) 94.59%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #308 +/- ## ========================================== + Coverage 94.58% 94.59% +0.01% ========================================== Files 45 45 Lines 2122 2129 +7 ========================================== + Hits 2007 2014 +7 Misses 115 115 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.