LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Import Python. Datatype List[int]

Hi

 

I have imported several .py files.

Now I have a Python datatype called list[int] that I don't know how to interpret.

Is there an datatype in LabVIEW that can be used for List[int]?

0 Kudos
Message 1 of 4
(1,876 Views)

Hi Kim,

 


@PR_Kim wrote:

Is there an datatype in LabVIEW that can be used for List[int]?


From what I learned about Python you could use an array of integer (I32?) in LabVIEW…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 4
(1,833 Views)

An integer array should work. As an example, I can write the following function in python:

 

def incrementList(listnIn):
    return list(item + 1 for item in listnIn)
 
In LabVIEW I can call the incrementList function using the Python Node with an I32 array as the return type and some other I32 array as the first input. I32 was just what I chose but you should be able to substitute that for any integer representation.
Matt J | National Instruments | CLA
Message 3 of 4
(1,821 Views)

Thanks for both of yours replies Matt and Gerd. It works now

0 Kudos
Message 4 of 4
(1,796 Views)