<div dir="ltr"><div>Chuck,<br></div><div><br></div><div>I attempted to find such a list from the Numpy website. A complete list like yours should be quite handy for users if available there.</div><div><br></div><div>Best regards,<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Em qua, 13 de fev de 2019 às 20:10, Charles R Harris <<a href="mailto:charlesr.harris@gmail.com">charlesr.harris@gmail.com</a>> escreveu:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Feb 13, 2019 at 2:14 PM Mauro Cavalcanti <<a href="mailto:maurobio@gmail.com" target="_blank">maurobio@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Chuck,</div><div><br></div><div>Sure, using numpy.sqrt works fine. <br></div><div><br></div><div>Thank you very much.</div><div><br></div><div>Best regards,<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Em qua, 13 de fev de 2019 às 19:09, Charles R Harris <<a href="mailto:charlesr.harris@gmail.com" target="_blank">charlesr.harris@gmail.com</a>> escreveu:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Feb 13, 2019 at 1:35 PM Mauro Cavalcanti <<a href="mailto:maurobio@gmail.com" target="_blank">maurobio@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div>Dear ALL,</div><div><br></div><div>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.</div><div><br></div><div>Here is the specific code:</div><div><br></div><div>def normTrans(y):<br>    denom = np.nansqrt(np.nansum(y**2))<br>    return y/denom<br></div><div><br></div><div>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 tested.</div><div><br></div><div>Am I right, or that function had existed in some past version of Numpy?</div><div><br></div><div>Thanks in advance for any comments or suggestions.  <br></div><div><br></div></div></div></blockquote><div><br></div><div>I don't recall any such function, but  nansum will not result in any nans, so plain old sqrt should work.</div><div><br></div></div></div></blockquote></div></blockquote><div><br></div><div>Note that there are various nan stat functions:</div><div><br></div><div><font face="monospace, monospace">- `nanmin` -- minimum non-NaN value</font></div><div><font face="monospace, monospace">- `nanmax` -- maximum non-NaN value</font></div><div><font face="monospace, monospace">- `nanargmin` -- index of minimum non-NaN value</font></div><div><font face="monospace, monospace">- `nanargmax` -- index of maximum non-NaN value</font></div><div><font face="monospace, monospace">- `nansum` -- sum of non-NaN values</font></div><div><font face="monospace, monospace">- `nanprod` -- product of non-NaN values</font></div><div><font face="monospace, monospace">- `nancumsum` -- cumulative sum of non-NaN values</font></div><div><font face="monospace, monospace">- `nancumprod` -- cumulative product of non-NaN values</font></div><div><font face="monospace, monospace">- `nanmean` -- mean of non-NaN values</font></div><div><font face="monospace, monospace">- `nanvar` -- variance of non-NaN values</font></div><div><font face="monospace, monospace">- `nanstd` -- standard deviation of non-NaN values</font></div><div><font face="monospace, monospace">- `nanmedian` -- median of non-NaN values</font></div><div><font face="monospace, monospace">- `nanquantile` -- qth quantile of non-NaN values</font></div><div><font face="monospace, monospace">- `nanpercentile` -- qth percentile of non-NaN values</font></div><div><br></div><div>Chuck </div></div></div></div>
_______________________________________________<br>
NumPy-Discussion mailing list<br>
<a href="mailto:NumPy-Discussion@python.org" target="_blank">NumPy-Discussion@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/numpy-discussion" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/numpy-discussion</a><br>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature">Dr. Mauro J. Cavalcanti<br>E-mail: <a href="mailto:maurobio@gmail.com" target="_blank">maurobio@gmail.com</a><br>Web: <a href="http://sites.google.com/site/maurobio" target="_blank">http://sites.google.com/site/maurobio</a><br>"Life is complex. It consists of real and imaginary parts."</div>