Numerical equality check between cpp and python module

Viewed 21

I am currently porting Python modules to cpp. I would like to make sure every module has numerical equality between Python and cpp.
In this regard, I have got a question: how can we programatically check the module's output of cpp and python are equal? Currently I am manually checking mean, std, max, min of the output array from both cpp and python module under a static dummy input value. However, there is a doubt that the modules might return different value when input value becomes different, and most of all, I would like to automize this comparison task somehow. I wonder if there is a more efficient way for numerical equality check between cpp and python than manual testing.
Can you please provide your advice on this?

0 Answers
Related