numpy 1.12 on OS X with mkl produces incorrect answer for numpy.dot
See original GitHub issueRunning numpy.dot normally produces the expected answer:
$ python -c "import numpy ; f=numpy.ones(2,dtype=numpy.float32);print f.dot(f)"
2.0
If I import a PyQt5 module first, I get a different answer:
$ python -c "import PyQt5.QtWidgets ; import numpy ; f=numpy.ones(2,dtype=numpy.float32);print f.dot(f)"
0.0
Other folks appear to have found the issue here, with an implied implication of the Accelerate library being loaded first. I could not discover the resolution they used, and I would prefer one that did not require fixing python import order.
Issue Analytics
- State:
- Created 7 years ago
- Comments:10 (7 by maintainers)
Top Results From Across the Web
Errors in sdot for float32 arrays on OSX, due to MKL bug #9758
I've found a very strange bug. Under certain circumstances, a small number of the entries in the dot product of two 2D arrays...
Read more >numpy.dot giving incorrect answer for large integers
I'm working on some linear algebra stuff, and simply can't figure out why numpy gives ...
Read more >NumPy User Guide
It is a Python library that provides a multidi- mensional array object, various derived objects (such as masked arrays and matrices), and an ......
Read more >Release Notes — NumPy v1.17 Manual
Starting in version 1.12.0, numpy incorrectly returned a negatively ... The NumPy 1.15.x OS X wheels released on PyPI no longer contain 32-bit...
Read more >Release notes — NumPy v1.24 Manual
Faster version of np.isin and np.in1d for integer arrays · Faster comparison ... numpy.random.randint produced incorrect value when the range was 2**32 ...
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
I suppose one option would be to see if you can reproduce your problem with Anaconda’s numpy+MKL build and then file a bug report with them 😈
fixed. see https://github.com/numpy/numpy/issues/9758#issuecomment-397400117 for details