D
D
Denis Lvov2019-10-01 18:58:35
Python
Denis Lvov, 2019-10-01 18:58:35

How to organize array filtering in Python numpy?

Good evening.
Tell me which direction to go.
For example, there is an array like:

a = np.array()

in numpy it seems like there was a thing that allows you to filter by a given parameter
(column 1 = 1) so that the output is:
[0, 1, 2]
[110, 1, 113]

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Andrey Dugin, 2019-10-02
@dwenlvov

a[ a[:, 1] == 1 ]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question