I tried using the np.isin() function but everytime I do, it returns me the error:
AttributeError: 'module' object has no attribute 'isin'
here is exactly what I do
import numpy as np
a = np.arange(9).reshape((3,3))
test = np.arange(5)
print np.isin(a, test)
I havent found any information about this problem, I use the latest version of numpy and havent had any problem with other numpy module, why does it returns me this error?
The isin
function was added in NumPy 1.13:
New
np.isin
function, improves onin1d
.
You're probably using an older version.
Reading through the Notes section of the docs shows
New in version 1.13.0.
I suspect that if you do
print(np.__version__)
you will see something less than 1.13.0
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With