Re: [Numpy-discussion] Adding a hex version like PY_VERSION_HEX

2018-10-09 Thread Eric Wieser
+1 on Ralf's suggestion. I'm not sure there's any case where the C code should be using a hex version number - either it's using the C api, in which case it should just be looking at the C api version - or it's calling back into the python API, in which case it's probably not unreasonable to ask

Re: [Numpy-discussion] Adding a hex version like PY_VERSION_HEX

2018-10-09 Thread Ralf Gommers
On Sat, Oct 6, 2018 at 11:24 PM Matti Picus wrote: > On 05/10/18 11:46, Jerome Kieffer wrote: > > On Fri, 5 Oct 2018 11:31:20 +0300 > > Matti Picus wrote: > > > >> In PR 12074 https://github.com/numpy/numpy/pull/12074 I propose adding > a > >> function `version.get_numpy_version_as_hex()` which

Re: [Numpy-discussion] Adding a hex version like PY_VERSION_HEX

2018-10-07 Thread Matti Picus
On 05/10/18 11:46, Jerome Kieffer wrote: On Fri, 5 Oct 2018 11:31:20 +0300 Matti Picus wrote: In PR 12074 https://github.com/numpy/numpy/pull/12074 I propose adding a function `version.get_numpy_version_as_hex()` which returns a hex value to represent the current NumPy version

[Numpy-discussion] Adding a hex version like PY_VERSION_HEX

2018-10-05 Thread Matti Picus
In PR 12074 https://github.com/numpy/numpy/pull/12074 I propose adding a function `version.get_numpy_version_as_hex()` which returns a hex value to represent the current NumPy version MAJOR.MINOR.MICRO where v = hex(MAJOR << 24 | MINOR << 16 | MICRO) so the current 1.15.0 would become