我正在尝试将矢量重塑为数组
myArray = np.reshape(myVector,[nCol,nRow])
但是我收到了折旧警告:
FutureWarning: reshape is deprecated and will raise in a subsequent release. Please use .values.reshape(...) instead
return reshape(newshape, order=order)
我用的时候
myArray = np.values.reshape(myVector,[nCol,nRow])
AttributeError: module 'numpy' has no attribute 'values'
请有人解释发生了什么以及我应该做什么?非常感谢
解决方法:
调用np.reshape(无论args)不再是调用函数的首选方法.相反,使用这个:
myArray = myVector.values.reshape([nCol,nRow])
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。