We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In NumPy I do this:
In [1]: import numpy as np In [2]: x = np.arange(9).reshape((3, 3)) In [3]: x Out[3]: array([[0, 1, 2], [3, 4, 5], [6, 7, 8]]) In [4]: ind = np.array([True, False, True]) In [5]: x[ind, :] Out[5]: array([[0, 1, 2], [6, 7, 8]]) In [6]: x[:, ind] Out[6]: array([[0, 2], [3, 5], [6, 8]])
In DyND-python I can get partway there
In [7]: from dynd import nd In [8]: x = nd.array(x) In [9]: x Out[9]: nd.array([[0, 1, 2], [3, 4, 5], [6, 7, 8]], type="3 * 3 * int64") In [10]: ind = nd.array(ind) In [11]: nd.take(x, ind) Out[11]: nd.array([[0, 1, 2], [6, 7, 8]], type="var * 3 * int64")
But don't know how to proceed to take along the other dimension.
The text was updated successfully, but these errors were encountered:
@izaid any comments here?
Sorry, something went wrong.
No branches or pull requests
In NumPy I do this:
In DyND-python I can get partway there
But don't know how to proceed to take along the other dimension.
The text was updated successfully, but these errors were encountered: