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 #3071: Add permutation to our generators #3078

Merged
merged 2 commits into from
Apr 5, 2024

Conversation

stress-tess
Copy link
Member

@stress-tess stress-tess commented Apr 3, 2024

This PR (closes #3071) adds permutation to rng.

Note:
The array version of the chpl permute proc requires idxType must be coercible from this stream’s eltType, so instead we use the domain version of permute and use that to gather the permuted vals. But we're not missing out on much because the array version seems to do the same thing but without aggregation

I also added:

  • .cls-commands.json to .gitignore which is added by the chpl vscode extension
  • a helper _val_isinstance_of_union to do an isinstance check on types in Union

@stress-tess stress-tess marked this pull request as draft April 3, 2024 21:14
This PR (closes Bears-R-Us#3071) adds permutation to `rng`.

The array version of the chpl `permute` proc requires idxType must be coercible from this stream’s eltType, so instead we use the domain version of `permute` and use that to gather the permuted vals. But we're not missing out on much because the array version seems to do the same thing but without aggregation
@stress-tess stress-tess marked this pull request as ready for review April 3, 2024 23:35
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! I just marked a few questions.

arkouda/random/_generator.py Outdated Show resolved Hide resolved
src/RandMsg.chpl Outdated Show resolved Hide resolved
src/RandMsg.chpl Outdated Show resolved Hide resolved
@stress-tess stress-tess requested a review from ajpotts April 4, 2024 23:51
@stress-tess stress-tess added this pull request to the merge queue Apr 5, 2024
Merged via the queue into Bears-R-Us:master with commit 8a30705 Apr 5, 2024
13 checks passed
@stress-tess stress-tess deleted the 3071_rng_permutation branch April 6, 2024 00:03
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.

Add permutation to random number generators
3 participants