[Numpy-discussion] Meson - C extension - Finding numpy includes in virtual env

2023-11-25 Thread Doug Turnbull
I am converting a Numpy C extension Python project from distutils to meson. I've been following along the meson-python instructions ( https://meson-python.readthedocs.io/en/latest/tutorials/introduction.html) I've installed meson / ninja (and everything else...) into a virtualenv (python -m venv v

[Numpy-discussion] savetxt() has fmt='%.18e' as default, but fmt='%.16e' is always sufficient

2023-11-25 Thread Jeppe Dakin
Double-precision numbers need at most 17 significant decimal digits to be serialised losslessly. Yet, savetxt() uses 19 by default, meaning that most files produced with savetxt() takes up about 9% more disk space than they need to, without any benefit. I have described the problem more detailed

[Numpy-discussion] Re: savetxt() has fmt='%.18e' as default, but fmt='%.16e' is always sufficient

2023-11-25 Thread Robert Kern
On Sat, Nov 25, 2023 at 11:18 AM Jeppe Dakin wrote: > Double-precision numbers need at most 17 significant decimal digits to be > serialised losslessly. Yet, savetxt() uses 19 by default, meaning that most > files produced with savetxt() takes up about 9% more disk space than they > need to, with

[Numpy-discussion] Re: Meson - C extension - Finding numpy includes in virtual env

2023-11-25 Thread Stefan van der Walt via NumPy-Discussion
Hi Doug, On Sat, Nov 25, 2023, at 07:14, Doug Turnbull wrote: > Unfortunately the following command fails: > > incdir_numpy = run_command(py, > ['-c', 'import numpy; print(numpy.get_include())'], > capture: true, > check: false, > ).stdout().strip() In your repo it says stderr, but the ver