Fix for Audio Loader pad argument
The merge requests contain 2 main changes:
-
Fix of the pad argument in
AudioLoader
. It was placed in the wrong class call and there were not tests to check audio frames whenpad=False
. I corrected this bug. This was a very simple fix and I added another test to check for this condition. -
I created 4 new utility functions:
ceil(), floor(), ceil_round_down() and floor_round_up()
. They are documented, please tell me if the description makes sense.
Ceil
and floor
are essentially the equivalent of numpy functions but they allow to round up to a decimal case instead of to an integer. The functionality is exactly the same as np.round()
with the decimal parameter (I dont know why numpy doesnt implement the same thing).
ceil_round_down and floor_round_up help deal with floating point arithmetics (see documentation of the functions for further description). For example np.floor(21.9999999998)
will result in 21
. With floor_round_up(21.9999999998, decimals=6)
for example, it will round up to 22
.
If you can come up with a better name for these two functions that would be great.