09-18-2020 07:34 AM
Is there a similar function/node in LabVIEW like python numpy digitize function??
09-18-2020 08:04 AM - edited 09-18-2020 08:06 AM
Hi dp,
so this numpy digitize() does mainly the same as the Threshold1DArray LabVIEW function…
(When I read/understand the description correctly.)
09-18-2020 09:09 AM
@GerdW wrote:
so this numpy digitize() does mainly the same as the Threshold1DArray LabVIEW function…
(When I read/understand the description correctly.)
I concur.
The "right : bool, optional" is missing though. This won't be trivial to fix. Probably check the remainder of result mod 1, and only add 1 to the quotient if it's !=0 (using the Sign function).
If the value is outside all bins the result will be different as well. You can probably make it act similar by adding a -Inf before all bins. This will return 0 if x is <bin[0], and 1 if it's in bin[1].