Skip to content
Discussion options

You must be logged in to vote

try

def sgn(x):
    return jnp.where(x >= 0, 1, -1)

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Answer selected by cpcpython
Comment options

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

@cpcpython
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants