SciSharp / NumSharp

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

Index of element with a condiction #422

Open EnricoBeltramo opened 4 years ago

EnricoBeltramo commented 4 years ago

I'm implementing a filter on array. In python it works well, but if I try to replicate in numsharp, doesn't:

var threshold = 0.01 var filter1 = XYZ1[2, Slice.All] < -threshold; var XYZ_1_filter = XYZ1[Slice.All, filter1]; var XYZ_2_filter = XYZ2[Slice.All, filter1];

In particular way, filter1 return null. How can I do? In general, how i can find indexes that respect a particular condiction (i.e. greater than, minor than) in numsharp?