[Python] I want to get a common set between numpy

Use 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)

Recommended Posts

[Python] I want to get a common set between numpy
I want to build a Python environment
I want to create a window in Python
I want to make a game with Python
I want to write to a file with Python
[Python memo] I want to get a 2-digit hexadecimal number from a decimal number
I want to embed a variable in a Python string
I want to easily implement a timeout in python
I want to iterate a Python generator many times
I want to generate a UUID quickly (memorandum) ~ Python ~
I want to write in Python! (2) Let's write a test
I want to randomly sample a file in Python
I want to work with a robot in python.
[Python] I want to make a nested list a tuple
I want to run a quantum computer with Python
I want to use a python data source in Re: Dash to get query results
I want to start a lot of processes from python
I tried "How to get a method decorated in Python"
I want to send a message from Python to LINE Bot
I want to debug with Python
I want to make input () a nice complement in python
I want to set up a GUI development environment with Python or Golang on Mac
I want to absorb the difference between the for statement on the Python + numpy matrix and the Julia for statement
I want to use a wildcard that I want to shell with Python remove
numpy: I want to convert a single type ndarray to a structured array
[Python] A memo that I tried to get started with asyncio
I want to do a full text search with elasticsearch + python
[Introduction] I want to make a Mastodon Bot with Python! 【Beginners】
I get a can't set attribute when using @property in python
I want to print in a comprehension
I want to use jar from python
How to get a stacktrace in python
I want to analyze logs with Python
I want to play with aws with python
I want to convert a table converted to PDF in Python back to CSV
I get a UnicodeDecodeError when trying to connect to oracle with python sqlalchemy
I want to color a part of an Excel string in Python
Python: I want to measure the processing time of a function neatly
I want to make a web application using React and Python flask
I want to do a monkey patch only partially safely in Python
I want to make matplotlib a dark theme
I want to do Dunnett's test in Python
[Python] Road to a snake charmer (4) Tweak Numpy
I want to INSERT a DataFrame into MSSQL
I want to memoize including Python keyword arguments
[Python] I want to manage 7DaysToDie from Discord! 1/3
I don't want to take a coding test
I tried to get CloudWatch data with Python
I want to merge nested dicts in Python
I want to use Temporary Directory with Python2
I want to get League of Legends data ③
I want to get League of Legends data ②
I want to use ceres solver from python
#Unresolved I want to compile gobject-introspection with Python3
I want to create a plug-in type implementation
I want to solve APG4b with Python (Chapter 2)
I want to sell Mercari by scraping python
I made a tool to get new articles
[Python] I want to manage 7DaysToDie from Discord! 2/3
I want to easily find a delicious restaurant
I want to make C ++ code from Python code!