Skip to content

Use local random state in ot.datasets.make_data_classif #510

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 24, 2023

Conversation

kachayev
Copy link
Collaborator

Types of changes

Switch from np.random.randn to rng.randn when generating make_data_classif dataset with dataset='2gauss_prop'.

Motivation and context / Related issue

It's not desirable to change global state. And it's already done for other datasets in the same function.

How has this been tested (if it applies)

n/a

PR checklist

  • I have read the CONTRIBUTING document.
  • The documentation is up-to-date with the changes I made (check build artifacts).
  • All tests passed, and additional code has been covered with new tests.
  • I have added the PR and Issue fix to the RELEASES.md file.

@codecov
Copy link

codecov bot commented Aug 23, 2023

Codecov Report

Merging #510 (40ee453) into master (9dd4d8d) will not change coverage.
The diff coverage is 100.00%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #510   +/-   ##
=======================================
  Coverage   96.05%   96.05%           
=======================================
  Files          65       65           
  Lines       13667    13667           
=======================================
  Hits        13128    13128           
  Misses        539      539           

Copy link
Collaborator

@agramfort agramfort left a comment

Choose a reason for hiding this comment

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

good catch

@agramfort agramfort merged commit 637d16e into PythonOT:master Aug 24, 2023
@kachayev kachayev deleted the fix-make-data-local-random branch August 24, 2023 09:30
@kachayev kachayev mentioned this pull request Aug 24, 2023
4 tasks
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