AttributeError:模块"numpy"没有属性"flip" [英] AttributeError: module 'numpy' has no attribute '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屋!