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

Closes #2993: Create random subfolder and foundation for generator #2997

Conversation

stress-tess
Copy link
Member

This PR (closes #2993) adds a random subfolder, moves the random generation methods from pdarraycreation under it, and adds the foundations for a generator class.

I left the function declarations in pdarraycreation and just have them call the ones in random to avoid breaking existing code since randint is very widely used. I'm fine with leaving them indefinitely or deprecating them, I don't have strong feelings either way.

Future work: Right now a generator method called multiple times always gives the same answer, which doesn't match what numpy does. I think can create a generator on chpl side to solve that issue, but I think saving that for a different PR makes sense since that involves adding a generator symbol entry

…nerator

This PR (closes Bears-R-Us#2993) adds a random subfolder, moves the random generation methods from pdarraycreation under it, and adds the foundations for a generator class.

I left the function declarations in pdarraycreation and just have them call the ones in `random` to avoid breaking existing code since `randint` is very widely used. I'm fine with leaving them indefinitely or deprecating them, I don't have strong feelings either way.

Future work: Right now a generator method called multiple times always gives the same answer, which doesn't match what numpy does. I think if we add a generator type to the symbol table we can solve that issue
@stress-tess
Copy link
Member Author

Also I want to note that I haven't included tests for this iteration. I plan on doing that once we add generatorSymEntry

Copy link
Contributor

@ajpotts ajpotts left a comment

Choose a reason for hiding this comment

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

Looks great! Just the one question.

arkouda/random/_legacy.py Show resolved Hide resolved
@stress-tess stress-tess merged commit 399f9c5 into Bears-R-Us:master Feb 29, 2024
13 checks passed
@stress-tess stress-tess deleted the 2993_random_subfolder_and_generator_barebones branch March 1, 2024 22:13
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.

create random subfolder and foundation for a generator
4 participants