1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

【python】numpy同士の共通集合を取得したい

Posted at

np.intersect1d を使用する


import numpy as np

array_1 = np.array([1, 2, 3, 4, 5])
array_2 = np.array([1, 3, 5, 7, 9])

np.intersect1d(array_1, array_2)

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?