Answers for "python replace negative infinity"

0

python replace negative infinity

import numpy as np

arr = np.array([9, -np.inf, 0, 1])

rep_val = 0
arr.replace(-np.inf, rep_val, inplace = True)
Posted by: Guest on October-01-2020

Code answers related to "python replace negative infinity"

Python Answers by Framework

Browse Popular Code Answers by Language