Python Replace Nan In Numpy Array Initialization In Cpp