SciSharp / NumSharp

High Performance Computation for N-D Tensors in .NET, similar API to NumPy.
https://github.com/SciSharp
Apache License 2.0
1.38k stars 192 forks source link

Duplicated (and incorrectly placed) code #303

Closed Plankton555 closed 5 years ago

Plankton555 commented 5 years ago

Duplicated code The files Creation/NdArrayRandom.Permutation.cs and Random/np.random.permutation.cs contain essentially the same code. The file in the Creation folder should be removed, I think.

Incorrectly placed code The files Creation/NdArrayRandom.Permutation.cs and Creation/NDArrayRandom.Shuffle.cs are located in the Creation folder. They should be moved to the Random folder. (the permutation file will solve itself when the duplication issue above is fixed)

The files seem to be in the correct namespaces, so I don't think that moving the files will break anyone's code, but I might be wrong about this.

henon commented 5 years ago

even if it breaks someones code it will be a minor issue and super easy to fix. I also suggest to rename the folder Random to RandomSampling because next time someone creates a file in that folder the namespace will automatically be Random which causes puzzling compilation errors

Plankton555 commented 5 years ago

Pull request submitted at https://github.com/SciSharp/NumSharp/pull/309