A mistake(?) in Std implementation #8256
Answered
by
jakevdp
EngineerKhan
asked this question in
Q&A
-
I have made a simple snippet:
When I call this |
Beta Was this translation helpful? Give feedback.
Answered by
jakevdp
Oct 18, 2021
Replies: 1 comment
-
Your |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
EngineerKhan
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Your
x
is 2-dimensional andy
is one-dimensional. This means thaty.size
andlen(y)
are the same, butx.size
andlen(x)
are not. If you switchjnp.sqrt(len(x))
tojnp.sqrt(x.size)
, your implementation will be correct for these inputs.