Skip to content
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

add random_sample and aliases #664

Merged
merged 5 commits into from
Sep 7, 2020
Merged

Conversation

mtar
Copy link
Collaborator

@mtar mtar commented Sep 4, 2020

Description

adding random functions and aliases

Issue/s resolved: #553

Changes proposed:

  • random.random
  • random.random_sample
  • random.sample
  • random.ranf
  • random.random_integer

Type of change

New Feature

Due Diligence

  • All split configurations tested
  • Multiple dtypes tested in relevant functions
  • Documentation updated (if needed)
  • Updated changelog.md under the title "Pending Additions"

Does this change modify the behaviour of other functions? If so, which?

no

@codecov
Copy link

codecov bot commented Sep 4, 2020

Codecov Report

Merging #664 into master will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #664   +/-   ##
=======================================
  Coverage   97.37%   97.37%           
=======================================
  Files          85       85           
  Lines       16646    16676   +30     
=======================================
+ Hits        16209    16239   +30     
  Misses        437      437           
Impacted Files Coverage Δ
heat/core/random.py 100.00% <100.00%> (ø)
heat/core/tests/test_random.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6f83026...f4b62dd. Read the comment docs.

Copy link
Member

@coquelin77 coquelin77 left a comment

Choose a reason for hiding this comment

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

looks good to me. only very minor changes before its ready

heat/core/random.py Show resolved Hide resolved


# aliases
random_sample = ranf = sample = random
Copy link
Member

Choose a reason for hiding this comment

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

where is randf from? i cant find that name in other packages

Copy link
Collaborator Author

@mtar mtar Sep 7, 2020

Choose a reason for hiding this comment

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

I found ranf as an alias in numpy.

coquelin77
coquelin77 previously approved these changes Sep 7, 2020
@coquelin77 coquelin77 merged commit d763bf1 into master Sep 7, 2020
@coquelin77 coquelin77 deleted the features/553-random_aliases branch September 7, 2020 14:32
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.

Implement random.random_sample
2 participants