Add array input support for the thor functor grammar
As discussed in #424 (comment 6182405), this MR will add a new Functor grammar to the standard array
module in python. This is useful for array input in Functor F.VALUE_OR
, since in C++ one can never construct a std::vector<double>
directly from std::vector<float>
as shown below:
std::vector<float> input_for_value_or { -999.f};
std::vector<double> output {input_for_value_or}; // Error! this can't be compiled
The standard array
model in python will allow you to specify the type of array using the typecode
, in which array('f',[...])
will correspond to an std::vector<float>
and array('d',[...])
will correspond to a std::vector<double>
in this new grammar.
Necessary tests are included in this MR.
This MR should be tested with Analysis!948 (merged)
Edited by Jiahui Zhuo
Merge request reports
Activity
Please register or sign in to reply