1. 查找矩阵中的NaN,并返回坐标
np.argwhere(np.isnan(data_x))
  1. 将nan替换为0
data_x = np.nan_to_num(data_x)
Logo

Agent 垂直技术社区,欢迎活跃、内容共建。

更多推荐