AttributeError: module 'numpy' has no attribute 'object'm.object was a deprecated alias for the builtin object

 

 错误描述:numpy版本太高,不支持np.object, np.bool, np.int,需要对应改成np.object_, np.bool_, np.int_或object、np.int32, np.int64

或者可以 在报错前patch/ monkey patch

import numpy as np
np.object = object

  

posted @ 2023-03-07 18:13  不要肥宅  阅读(1889)  评论(0编辑  收藏  举报