Skip to content

Fix uniform noise generation for events#322

Open
maxime-vaillant wants to merge 1 commit intoneuromorphs:developfrom
maxime-vaillant:patch-2
Open

Fix uniform noise generation for events#322
maxime-vaillant wants to merge 1 commit intoneuromorphs:developfrom
maxime-vaillant:patch-2

Conversation

@maxime-vaillant
Copy link
Copy Markdown

In the original UniformNoise implementation, x, y and polarity was randomly chosen using float values. For x and y it might not be a problem because of integer casting later, but for polarity it lead to a random choice of values center in 1, so most of polarity event generated will be casted in 1.

Fixing implementation : use np.random.randint for x, y and p instead of np.random.uniform.

@codecov-commenter
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 76.50%. Comparing base (a4e8a45) to head (f26c6ed).
⚠️ Report is 136 commits behind head on develop.
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #322      +/-   ##
===========================================
- Coverage    77.07%   76.50%   -0.58%     
===========================================
  Files           54       48       -6     
  Lines         3067     2992      -75     
===========================================
- Hits          2364     2289      -75     
  Misses         703      703              

☔ 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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants