Skip to content

Typo in the permissive_sum "gotcha"? #8593

Answered by soraros
lrizzello asked this question in General
Discussion options

You must be logged in to vote

I think the point they are trying to make is that you shouldn't pass in lists and convert them to arrays inside of a function.
You should read jnp.sum(jnp.array(x)) as passing an array jnp.array(x) to the function jnp.sum(for there is no need to wrap it in a lambda).

Replies: 2 comments 2 replies

Comment options

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

Answer selected by lrizzello
Comment options

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

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