Skip to content
Discussion options

You must be logged in to vote

If k is a constant, you may use x[jnp.nonzero(~jnp.isnan(x), size=k)] then pad it to n elements.
Actually this is counting sort.

Replies: 2 comments 8 replies

Comment options

You must be logged in to vote
7 replies
@YouJiacheng
Comment options

@Egiob
Comment options

@jakevdp
Comment options

@YouJiacheng
Comment options

@Egiob
Comment options

Comment options

You must be logged in to vote
1 reply
@Egiob
Comment options

Answer selected by Egiob
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants