AttributeError:模块"numpy"没有属性"flip" [英] AttributeError: module 'numpy' has no attribute 'flip'

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

问题描述

错误消息: AttributeError:模块'numpy'没有属性'flip'

Error message: AttributeError: module 'numpy' has no attribute 'flip'

我无法理解为什么会出现此错误,我已经在Google上搜索并确保使用最新版本的numpy.我的工作目录中肯定没有另一个名为numpy的文件.任何帮助将不胜感激!

I can't understand why it's giving me this error, I've googled and made sure I'm up to the latest version of numpy. I definitely don't have another file called numpy in my working directory. Any help would be greatly appreciated!

推荐答案

np.flip已针对v.1.12.0及更高版本引入.对于旧版本,您可以考虑使用 np.fliplr np.flipud .

np.flip has been introduced for versions v.1.12.0 and beyond. For older versions, you can consider using np.fliplr and np.flipud.

或者,使用pip install --user --upgrade numpy升级您的numpy版本.

Alternatively, upgrade your numpy version using pip install --user --upgrade numpy.

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

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