Skip to content

Commit 1499e02

Browse files
authored
Merge pull request #309 from Plankton555/refact/incorrectly_placed_code
Removed duplicate code and moved incorrectly placed code
2 parents 3ac537c + fb1c8ed commit 1499e02

16 files changed

Lines changed: 4 additions & 35 deletions

src/NumSharp.Core/Creation/NdArrayRandom.Permutation.cs

Lines changed: 0 additions & 30 deletions
This file was deleted.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

src/NumSharp.Core/Creation/NDArrayRandom.Shuffle.cs renamed to src/NumSharp.Core/RandomSampling/np.random.shuffle.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,14 @@ public partial class NumPyRandom
1010
{
1111
public void shuffle(NDArray list)
1212
{
13-
var rng = new Randomizer();
1413
var count = list.size;
1514

1615
Array listArr = list.Array;
1716

1817
while (count > 1)
1918
{
2019
count--;
21-
var k = rng.Next(count + 1);
20+
var k = randomizer.Next(count + 1);
2221
var value = listArr.GetValue(k);
2322
listArr.SetValue(listArr.GetValue(count),k);
2423
listArr.SetValue(value,count);
File renamed without changes.

0 commit comments

Comments
 (0)