We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1dbb784 commit d90d159Copy full SHA for d90d159
docs/src/debugging.md
@@ -78,8 +78,8 @@ import ClimaCore
78
import Infiltrator # must be in your default environment
79
ClimaCore.DebugOnly.call_post_op_callback() = true
80
function ClimaCore.DebugOnly.post_op_callback(result, args...; kwargs...)
81
- has_nans = any(isnan, parent(result))
82
- has_inf = any(isinf, parent(result))
+ has_nans = result isa Number ? isnan(result) : any(isnan, parent(result))
+ has_inf = result isa Number ? isinf(result) : any(isinf, parent(result))
83
if has_nans || has_inf
84
has_nans && println("NaNs found!")
85
has_inf && println("Infs found!")
0 commit comments