[Numpy-discussion] 'nansqrt' function?
Charles R Harris
charlesr.harris at gmail.com
Wed Feb 13 16:08:20 EST 2019
On Wed, Feb 13, 2019 at 1:35 PM Mauro Cavalcanti <maurobio at gmail.com> wrote:
> Dear ALL,
> In the process of porting an existing (but abandoned) package to the
> latest version of Numpy, I stumbled upon a call to a 'numpy.nansqrt'
> function, which seems not to exist.
> Here is the specific code:
> def normTrans(y):
> denom = np.nansqrt(np.nansum(y**2))
> return y/denom
> As far as I could find, there is no such 'nansqrt' function in the current
> version of Numpy, so I suspect that the above code has not been properly
> Am I right, or that function had existed in some past version of Numpy?
> Thanks in advance for any comments or suggestions.
I don't recall any such function, but nansum will not result in any nans,
so plain old sqrt should work.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the NumPy-Discussion