I am attempting to call np.argsort() on the following array:
[0.700656592845917, 0.651415288448334, 0.719015657901764] dtype = Double
The expected result should be:
[1, 0, 2]
However, the actual result I'm getting is:
[0, 2, 1]
This doesn't to produce a result that is sorted in any direction. I pulled in ndarray.argsort locally and changed line 31 -
from: var data = Array;
to: var data = ToArray<T>()
(Also changing the declaration of the function to include where T : unmanaged )
And this seemed to work for me.
I am attempting to call np.argsort() on the following array:
[0.700656592845917, 0.651415288448334, 0.719015657901764] dtype = Double
The expected result should be:
[1, 0, 2]
However, the actual result I'm getting is:
[0, 2, 1]
This doesn't to produce a result that is sorted in any direction. I pulled in ndarray.argsort locally and changed line 31 -
from:
var data = Array;to:
var data = ToArray<T>()(Also changing the declaration of the function to include
where T : unmanaged)And this seemed to work for me.