BUG: implementation of npy_get_floatstatus_barrier incomplete for musl libc
See original GitHub issueI’ve ran into issue with linalg.solve on different systems: in RHEL and Ubuntu it will raise an LinAlgError exception, but on Alpine it will return nan
.
Ubuntu:
$ docker run -it --rm ubuntu:18.04 /bin/sh
$ apt-get install python3-numpy
# python3
Python 3.6.6 (default, Sep 12 2018, 18:26:19)
[GCC 8.0.1 20180414 (experimental) [trunk revision 259383]] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
>>> numpy.linalg.solve(numpy.array([[0]]), numpy.array([[0]]))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3/dist-packages/numpy/linalg/linalg.py", line 375, in solve
r = gufunc(a, b, signature=signature, extobj=extobj)
File "/usr/lib/python3/dist-packages/numpy/linalg/linalg.py", line 90, in _raise_linalgerror_singular
raise LinAlgError("Singular matrix")
numpy.linalg.linalg.LinAlgError: Singular matrix
Alpine:
$ docker run -it --rm alpine:3.8 /bin/sh
# apk --update add python3 py3-numpy
/ # python3
Python 3.6.6 (default, Aug 24 2018, 05:04:18)
[GCC 6.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy
>>> numpy.linalg.solve(numpy.array([[0]]), numpy.array([[0]]))
array([[nan]])
I would expect to receive same exception on Alpine as well. Is this known issue?
I’ve tried to use either lapack or openblas on alpine, compile numpy from source — it’s still would return nan
.
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (6 by maintainers)
Top Results From Across the Web
FAQ - musl libc
It's a bug to assume a certain implementation has particular properties rather than testing. ... sys/queue.h is a full library implemented in a...
Read more >musl FAQ - musl libc
This is an application bug, and fixing it is as simple as adding the missing #include directives. Using implementation details from the glibc...
Read more >Bugs found by musl
Bugs found and reported ... search.h implementation bugs in bsd libc and glibc (stack overflow, hsearch crashes on glibc); several libm bugs in...
Read more >Functional differences from glibc - musl libc
Such code has been a perpetual source of bugs in the glibc implementation. Until version 1.1.17, this difference was visible to applications which...
Read more >Reporting Bugs - musl libc
Reporting Bugs. Bug reports should be sent to the musl mailing list, musl@lists.openwall.com . You do not need to be subscribed to post...
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 Free
Top 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
ok, thanks. @sashkab see this comment for why that happens.
They were: