2 ms·
Depends on what you mean by wrong. The point of NaNs and infinities is that sometimes it is easier/faster/cleaner to just let those things propagate through th
by adrianratnapala 8y ago
Depends on what you mean by wrong.
The point of NaNs and infinities is that sometimes it is easier/faster/cleaner to just let those things propagate through the calculation than to do conditional logic that in the end just tends to just simulate the same effect.
True, that consideration is more valid for element-by-element operations rather than things like matrix multiplications. But depending on the operation it might make sense to rely on NaN propagation rather than trying to prescan you matrix for NaNs.