LinAlgError Array must not contain infs or NaNs
See original GitHub issueI’m having some weird behavior. In my local environment the same code works as expected, and in my prod environment throws this error:
LinAlgError Array must not contain infs or NaNs
This is because a matrix in prod has nans, but the same matrix in local is correct. So this makes me think that for some reason numpy is working differently in my prod environment.
I’m running python 2.7.6 using GCC 4.2.1 on osx in my local environment. And i’m running python 2.7.3 using GCC 4.6.3 on ubuntu 12.04 in my prod environment.
Does anyone know which may be the difference in the numpy behavior? Any help is appreciated!
Issue Analytics
- State:
- Created 10 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
"ValueError: array must not contain infs or NaNs" - Stack ...
I am aware of scikit-learn GitHub issue #2089, but since I use scikit-learn 0.16.1 (with Python 2.7.10 x64) this problem should be solved...
Read more >numpy.linalg.LinAlgError: Array must not contain infs or NaNs ...
Hi All, I searched the following error but no solution so I posted it as a separate topic. Any suggestion? Thanks.
Read more >Getting 'ValueError: array must not contain infs or NaNs' even ...
I'm getting this ValueError: array must not contain infs or NaNs even after I used np.nan_to_num(). As you can see in the code...
Read more >As Function Inputs - ValueError: array must not contain infs or ...
I am trying to fit a series of parameter inputs to a function where the inputs are able to change over time (and...
Read more >ValueError: array must not contain infs or NaNs_赵孝正的博客
ValueError : array must not contain infs or NaNs 上面代码计算的结果,存入数据中,因为计算结果可能为infs或者NaNs,所以抛出异常。
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi, can you share what exactly did you use to fix the problem. I am having the same issue with using this: eig_vals, eig_vecs = np.linalg.eig(matx)
Changed BLAS library and worked. Although the variances are different with different BLAS libraries. Don’t know why this happens 😦