没有"isin"的numpy属性 [英] numpy having no "isin" attribute

查看:267
本文介绍了没有"isin"的numpy属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试使用np.isin()函数,但每次执行时,它都会向我返回错误:

I tried using the np.isin() function but everytime I do, it returns me the error:

AttributeError: 'module' object has no attribute 'isin'

这正是我要做的

import numpy as np
a = np.arange(9).reshape((3,3))
test = np.arange(5)
print np.isin(a, test)

我没有找到有关此问题的任何信息,我使用的是最新版本的numpy,而其他numpy模块则没有任何问题,为什么它会向我返回此错误?

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?

推荐答案

通读

1.13.0版中的新功能.

New in version 1.13.0.

我怀疑如果你这样做

print(np.__version__)

您会看到少于1.13.0的内容.

这篇关于没有"isin"的numpy属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆