Skip to content

refactor: drop duplicate NewNormalVector method#1257

Merged
zhenghaoz merged 1 commit intogorse-io:masterfrom
Goodnight77:cleanup/dedup-normal-vector-function
Apr 30, 2026
Merged

refactor: drop duplicate NewNormalVector method#1257
zhenghaoz merged 1 commit intogorse-io:masterfrom
Goodnight77:cleanup/dedup-normal-vector-function

Conversation

@Goodnight77
Copy link
Copy Markdown
Contributor

description:

  • remove duplicate NewNormalVector method. it had the same body as NormalVector
  • NormalMatrix updated to call NormalVector.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes a duplicate random-vector generator method on util.RandomGenerator and updates NormalMatrix to use the remaining implementation, reducing redundant code in the common/util helpers used across model/dataset components.

Changes:

  • Remove the duplicate NewNormalVector method implementation.
  • Keep a single NormalVector implementation for generating normally-distributed []float32.
  • Update NormalMatrix to call NormalVector.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread common/util/random.go
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 29, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 72.96%. Comparing base (1dac895) to head (671fdad).
⚠️ Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1257   +/-   ##
=======================================
  Coverage   72.95%   72.96%           
=======================================
  Files          91       91           
  Lines       16720    16715    -5     
=======================================
- Hits        12198    12196    -2     
+ Misses       3278     3275    -3     
  Partials     1244     1244           

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

@zhenghaoz zhenghaoz merged commit a2abb9e into gorse-io:master Apr 30, 2026
17 checks passed
@Goodnight77 Goodnight77 deleted the cleanup/dedup-normal-vector-function branch April 30, 2026 00:15
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.

3 participants