LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Labview Python node return 2x 1D array and 3x single values

Hello!

 

I work on my thesis, and the python node is kinda new to me. From LabView I send the selected features and target variables to Python. There I do some machine learning stuff, but this is not the problem. After getting the y_pred (1D array), y_test (1D array), the Python calculating RMSE, R2 and MAE values, which are single values. When I programmed that, it worked, because the y_pred and y_test wasn't a 1D array, just single values. But with bigger amount of features and target variables, it can't give me back anything and I getting error codes. I changed the return type to 2D array, but still nothing.

 

I hope someone with some experience can help me.

 

Thanks,

Balázs

Download All
0 Kudos
Message 1 of 3
(901 Views)
可以保存为2020或以下版本吗?我电脑上没有2021版本
0 Kudos
Message 2 of 3
(794 Views)

@balazsmore wrote:

Hello!

.. and I getting error codes.

 


Which ones? What do they say?

 

 


@balazsmore wrote:

I changed the return type to 2D array, but still nothing.

 


I haven't worked with python nodes, but I guess that you would need to to some cluster return type. If you are returning mixed data, you are returning a tuple. I guess LabVIEW wants to know exactly what is coming through, being statically typed and all.

 

Alternatively, change your python code so that only one piece of the information is returned per function - or return everything as a big string, if you just need some quick fix (this is super not best practice though).

0 Kudos
Message 3 of 3
(783 Views)