Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • ketos ketos
  • Project information
    • Project information
    • Activity
    • Labels
    • Planning hierarchy
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 27
    • Issues 27
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • public_projects
  • ketosketos
  • Merge requests
  • !250

Merged
Created Jun 07, 2022 by Bruno Padovese@bpadoveseOwner

Fix for Audio Loader pad argument

  • Overview 0
  • Commits 6
  • Pipelines 3
  • Changes 6

The merge requests contain 2 main changes:

  1. Fix of the pad argument in AudioLoader. It was placed in the wrong class call and there were not tests to check audio frames when pad=False. I corrected this bug. This was a very simple fix and I added another test to check for this condition.

  2. 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.

Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: fix_AudioFrameLoader_pad_argument