NumSharp icon indicating copy to clipboard operation
NumSharp copied to clipboard

Implicit operators for >, >=, <, <=

Open deepakkumar1984 opened this issue 6 years ago • 5 comments
trafficstars

x == 1 gives a result which is NDArray as expected

x>1 and other operators like >=, <, <= give null result

deepakkumar1984 avatar Oct 06 '19 07:10 deepakkumar1984

np.where is yet to be implemented.

Nucs avatar Oct 06 '19 07:10 Nucs

I have done some work with np.where in this commit https://github.com/deepakkumar1984/NumSharp/commit/8bfa4f2484fc974e10e250f6b7ef5da0f381b683 the first parameter is a condition for which we need to finish the implementation under https://github.com/SciSharp/NumSharp/tree/master/src/NumSharp.Core/Operations/Elementwise

Most of the code in commented and return as null

deepakkumar1984 avatar Oct 06 '19 08:10 deepakkumar1984

I misunderstood np.where, I was sure that the first argument is something of a sort of Expression<Func<..., bool>>. I'll need to implement each (comparing) operator separately and np.where will work then. I'll open up a separate issue for that. This might take a while as I'm unavailable (sunday is not a day off in my country 😅)

Nucs avatar Oct 06 '19 09:10 Nucs

Same thing happened for me, shouldn't return null: image

Oceania2018 avatar Oct 12 '19 00:10 Oceania2018

Null because it is not implemented.

Nucs avatar Oct 12 '19 00:10 Nucs