Skip to content

how to apply idxmax to more than one dimension? #4957

Answered by mathause
raybellwaves asked this question in Q&A
Discussion options

You must be logged in to vote

I don't think idxmax can currently do this. But argmax can

da.argmax(["x", "y"])

out:

{'x': <xarray.DataArray ()>
 array(2),
 'y': <xarray.DataArray ()>
 array(1)}

We should really align the two...

Replies: 1 comment 1 reply

Comment options

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

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