Error with np.nan_to_num(arg, nan=-1) : nan is an unexpected argument

HI ,

the nan argument is not working for Jupyter notebook for: np.nan_to_num(arg, nan=-1)

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-304-72801bf40392> in <module>
----> 1 planets_new = np.nan_to_num(planets,nan = -1)

TypeError: nan_to_num() got an unexpected keyword argument 'nan'

Possibly because of an old version of numpy.
Check this thread: