SciSharp / SciSharp/NumSharp

np.random.choice with replace: false produces duplicates

Open
#490 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
1.5k
Forks
205
Avg merge
7d 7h
Merged PRs (30d)
2

Description

e.g. np.random.choice(71, new Shape(40), replace: false) is producing duplicates.

I've tried setting the seed to provide a reproducible example, but that doesn't seem to work either.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the np.random.choice(71, new Shape(40), replace: false) case and check whether duplicates occur. Also test whether setting a seed makes the result reproducible; done means identifying the cause of duplicate values and confirming that sampling without replacement produces unique results.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, numpy
Domain
data
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.