Closed mgrover1 closed 1 year ago
Hi @mgrover1 ,
A dirty quick fix I used in our Py-ART fork is to replace
r += dabs(x[i]-y[i])**p
by
r += dabs(dabs(x[i]-y[i])**p)
And it does compile,
but anyway I'm highly interested if you find a cleaner solution,
I will give that a try - thanks so much @wolfidan !
@wolfidan - we are still seeing failures in the continuous integration/testing - did you see similar errors?https://github.com/ARM-DOE/pyart/actions/runs/5599879973/jobs/10241541373
Hi @mgrover1 , in pyart/map/grid_mapper.py, there is a leafsize = 10.
(with dot), you have to replace it by 10 (in int). I think
Ahhhhhh good catch - the issue is the power operator is treated differently in 3.0 compared to previous versions...
https://cython.readthedocs.io/en/latest/src/userguide/migrating_to_cy30.html
Cython 3 has changed the behaviour of the power operator to be more like Python. The consequences are that
a**b of two ints may return a floating point type,
a**b of one or more non-complex floating point numbers may return a complex number.
The old behaviour can be restored by setting the cpow [compiler directive](https://cython.readthedocs.io/en/latest/src/userguide/source_files_and_compilation.html#compiler-directives) to True.
We can change this behavior by setting cpow=True
in the setup.py
configuration.
Wow great, thtat you found that!
Description
Cython recently released version 3.0, which is leading to breaking CI for Py-ART due to some API changes + updated needed on our side.
Example failing CI
Proposed solution
We should pin to cython < 3.0 for now, and work on this migration.