Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
oiuswv
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
4 ms
·
1.
▲
by
oiuswv
11y ago
Here, I'll use logical indexing to pull out all the positive even numbers from this array of random integers: Numpy: a = np.random.random_integers(low = -100, high = 100, size = (100,)) a[np.logical_and(a % 2 == 0, a > 0) (o