<!DOCTYPE html><html><head><title></title><style type="text/css">p.MsoNormal,p.MsoNoSpacing{margin:0}</style></head><body><div>On Thu, Apr 4, 2019, at 10:12, kikocorreoso wrote:<br></div><blockquote type="cite" id="fastmail-quoted"><div><div><div>I
 propose to add some keywords to nan_to_num function. The addition do
not modify the actual behavior. Information related with this addition
can be found in these links:<br></div><div><a rel="noreferrer nofollow noopener" href="https://github.com/numpy/numpy/pull/13219">https://github.com/numpy/numpy/pull/13219</a><br></div><div><a rel="noreferrer nofollow noopener" href="https://github.com/numpy/numpy/pull/9355">https://github.com/numpy/numpy/pull/9355</a><br></div></div></div></blockquote><div><br></div><div>The added functionality seems fine, given what that function does already.  But, a question for those who have seen its API put in place:<br></div><div><br></div><div>What is the rationale behind replacing infinities, when the function is called `nan_to_num`?<br></div><div><br></div><div>Also, this odd part of the docstring:<br></div><div><br></div><div><i>NumPy uses the IEEE Standard for Binary Floating-Point for Arithmetic</i><i><br></i></div><div><i>(IEEE 754). This means that Not a Number is not equivalent to infinity.</i><i><br></i></div><div><br></div><div>The meaning of this note isn't clear to me.  Why would the reader suspect that Not a Number is equivalent to infinity?  Do we detail somewhere how NaN's vs infinities typically arise in code?<br></div><div><br></div><div>Stéfan<br></div><div><br></div><div><div><br></div></div><div><br></div></body></html>