You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In [1]: np.__version__
Out[1]: '1.10.0.dev0+a92c4a1'
In [2]: x = np.array([ -91, -119, -137, -132], dtype=np.int16)
In [3]: np.linalg.norm(x)
/Users/warren/local_scipy/lib/python2.7/site-packages/numpy/linalg/linalg.py:2126: RuntimeWarning: invalid value encountered in sqrt
ret = sqrt(sqnorm)
Out[3]: nan
Example:
The example is from http://stackoverflow.com/questions/31685156/normalizing-vector-produces-nan-in-numpy, although it is not clear in that question if the array has type int16.
The text was updated successfully, but these errors were encountered: