question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Numpy tests fail on musl/AlpineLinux

See original GitHub issue

On AlpineLinux, which is a mil based Linux distributive, some of numpy’s test fail. The log is attached. log.txt

There are two types of issues - one for various missed overflow/underflow exceptions, the second one is for incorrect results from musl’s trigonometric functions.

The first one can be fixed by including fenv.h header in musl builds, AFAIU this can be done in numpy/numpy/core/src/npymath/ieee754.c.src and numpy/core/include/numpy/ufuncobject.h by replacing __GLIBC__ with __GNUC__

The second group can be fixed by disabling the trigonometric functions in numpy/numpy/core/src/private/npy_config.h not only for glibc, but also for musl. An issue here is that musl doesn’t provide any macro like the __GLIBC__ to detect it.

So the question, is numpy interested in such a patch? Could you please share your opinions what is best way to implement it?

Otherwise the patch can be implement in corresponding package for AlpineLinux

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

4reactions
kylekylecommented, Mar 19, 2016

Yep, still no numpy for alpine users (which is increasingly popular as a docker base). It’s made life miserable for our python users. Would love to see a patch.

0reactions
mattipcommented, Oct 9, 2018

Duplicate of #12095, closing this since the other has more information

Read more comments on GitHub >

github_iconTop Results From Across the Web

python 2.7 - Numpy test() finished with errors - Stack Overflow
1 Answer 1 · there are some prerequisites for working with numpy / scipy : g++ gfortran blas atlas lapack . · it...
Read more >
Test Support (numpy.testing) — NumPy v1.24 Manual
Raises an AssertionError if two objects are not equal up to desired precision. Test if two objects are equal, and print an error...
Read more >
Testing Guidelines — NumPy v1.24 Manual
Tests on random data are good, but since test failures are meant to expose new bugs or regressions, a test that passes most...
Read more >
Testing Guidelines — NumPy v1.17 Manual
If the assertion fails, the test fails. Note that the Python builtin assert should not be used, because it is stripped during compilation...
Read more >
numpy.testing.assert_array_almost_equal
decimalint, optional. Desired precision, default is 6. err_msgstr, optional. The error message to be printed in case of failure ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found