Answers for "numpy nan to num"

2

numpy fill na with 0

import numpy as np

A[np.isnan(A)] = 0
Posted by: Guest on August-21-2020
0

numpy is not nan

a = a[~np.isnan(a)]
Posted by: Guest on September-09-2020

Python Answers by Framework

Browse Popular Code Answers by Language