How do i return an array in blueprint from c++

Hi i have a method which is blueprint callable

UFUNCTION(BlueprintPure, Category = “NeuralNetwork”)
void GetWeights(TArray& Weights);

But whenever i try to compile i get this error

Type ‘TArray’ is not supported by blueprint

anyone know how to pass an array in c++ to blueprint??

The error message is misleading. The problem here is that double is not supported by Blueprint. Use float instead.

Thanks, it worked.

Glad to help you, could you please accept the answer to mark the question resolved?