OK, I've looked at the issue. I think a note in the code explaining the need for the explicit error handling would be appropriate. I'm not clear on why isnan isn't always false for inexact types, but that is another story. Note that copyto could be used for the assignment and allows specification of casting and that could be useful.

As to the error message, the real cause seems to be the result type is not compatible with nan, not that an all nan axis occurs. So maybe something in the general vacinity of  "got all nan axis in non-floating type array." Which also nicely incapsulates my confusion as to how that happens.