Given a 2-D array X and integer n, return the rows of X that:
X
n
These are the rows interpretable as draws from a multinomial with n degrees.
Input
X = [[1. 0. 3. 8. ] [2. 0. 1. 1. ] [1.5 2.5 1. 0. ]] n = 4
Output
[[2. 0. 1. 1.]]
This one's part of Premium. Unlock the full NumPy track plus every other premium problem on the site.
solve(...)