LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

numpy digitize function in labview

Is there a similar function/node in LabVIEW like python numpy digitize function??

0 Kudos
Message 1 of 3
(363 Views)

Hi dp,

 

so this numpy digitize() does mainly the same as the Threshold1DArray LabVIEW function…

(When I read/understand the description correctly.)

Best regards,
GerdW


using LV2020 on Win8.1+cRIO
Message 2 of 3
(349 Views)

@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].

0 Kudos
Message 3 of 3
(322 Views)