📜  数组不得包含 infs 或 NaN - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:50.225000             🧑  作者: Mango

代码示例1
#Please check if any of your values being passed in are NaN or inf:
np.isnan(x).any()
np.isnan(y).any()

np.isinf(x).any()
np.isinf(y).any()

#If any of those yields true. Remove the nan entries or inf entries.