The Python wrapper could implement any behavior. Returning None
would probably make the most sense, because it would be consistent with the behavior when a vector is returned as double*
(and the value is nullptr
). Throwing some exception could be acceptable, too, but then maybe returning nullptr
for a double*
pointer should throw an exception, too.