Skip to content

Strange error when I try to define my own operator #403

Answered by MilesCranmer
xuyuon asked this question in Q&A
Discussion options

You must be logged in to vote

If you are using precision=32 (default), then your operators have to use only Float32. So either use precision=64, or write your operator like this:

        "gau(x::T) where {T} = isfinite(x) ? exp(-T(0.5) * x^T(2)) : T(NaN)",

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@MilesCranmer
Comment options

@xuyuon
Comment options

Answer selected by xuyuon
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
PySR PySR-related discussion
2 participants