Does isnan() always return a scalar?
The documentation in the function registry implies that the builtin isnan
function always returns a scalar value. That's not the case in the Python implementation, where the result that is returned is the same shape as the input.