check identify 実体が同じか

複数のパッケージで提供されている関数が,実体が同じなのか違うのかはisで調べる.

>>> import numpy as sp

>>> import scipy as sp

>>> from scipy import fftpack

>>> np.fft.fft is sp.fft

True # numpy.fft と Scipy のfftは同じ

>>> np.fft.fft is sp.fftpack.fft

False # numpy.fft と Scipy.fftpack のfftは違う

Functions which are provided by multiple packages can be checked using "is".

>>> import numpy as sp

>>> import scipy as sp

>>> from scipy import fftpack

>>> np.fft.fft is sp.fft

True # fft in numpy.fft and fft in Scipy are the same

>>> np.fft.fft is sp.fftpack.fft

False # fft in numpy.fft and fft in Scipy.fftpack are different.