-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compilation failures with Cython 3.0 #8868
Comments
This would be someday and likely not until statsmodels 0.15 which is about a year away. |
These appear to be Cython bugs. Have they been reported to Cython? |
Why would they? FWICS it's Cython becoming more strict and rejecting addition of incompatible types. |
Because they are deciding to use a power function that returns a complex value rather than the double function |
np.float64(-1.0) ** np.float64(0.5) does not return a complex. It warns and returns |
Apparently it's a deliberate change (but FWIU can be trivially changed back): https://docs.cython.org/en/latest/src/userguide/migrating_to_cy30.html#power-operator |
Thanks for noting the change. I still think cython 3 won't have any support until 0.15 since changing Cython seems like a big deal. |
My preference would be to keep both versions supported. I'm not sure how feasible that is with a large code base though. |
Will there be a problem if packages are compiled with different major versions of cython? |
Cython is not working well. It is casing c floats to doubles, then performing double complex ops, and then won't cast back to C float. |
Describe the bug
When building against Cython 3.0.0b2, I get the following errors:
Error output
While this is still a beta, it means that the release is just around the corner and we're trying to report problems early. Furthermore, some packages already decided to require Cython-3 which makes all incompatibilities a true PITA for Linux distributions.
Output of
import statsmodels.api as sm; sm.show_versions()
INSTALLED VERSIONS
Python: 3.10.11.final.0
OS: Linux 6.2.14-gentoo-dist #1 SMP PREEMPT_DYNAMIC Mon May 1 15:03:02 -00 2023 x86_64
byteorder: little
LC_ALL: None
LANG: C.UTF8
statsmodels
Installed: 0.14.0 (/usr/lib/python3.10/site-packages/statsmodels)
Required Dependencies
cython: 0.29.34 (/usr/lib/python3.10/site-packages/Cython)
numpy: 1.24.3 (/usr/lib/python3.10/site-packages/numpy)
scipy: 1.10.1 (/usr/lib/python3.10/site-packages/scipy)
pandas: 2.0.1 (/usr/lib/python3.10/site-packages/pandas)
dateutil: 2.8.2 (/usr/lib/python3.10/site-packages/dateutil)
patsy: 0.5.3 (/usr/lib/python3.10/site-packages/patsy)
Optional Dependencies
matplotlib: 3.7.1 (/usr/lib/python3.10/site-packages/matplotlib)
backend: agg
cvxopt: Not installed
joblib: 1.1.0 (/usr/lib/python3.10/site-packages/joblib)
Developer Tools
IPython: 8.13.2 (/usr/lib/python3.10/site-packages/IPython)
jinja2: 3.1.2 (/usr/lib/python3.10/site-packages/jinja2)
sphinx: 6.2.1 (/usr/lib/python3.10/site-packages/sphinx)
pygments: 2.15.1 (/usr/lib/python3.10/site-packages/pygments)
pytest: 7.3.1 (/usr/lib/python3.10/site-packages/pytest)
virtualenv: 20.23.0 (/usr/lib/python3.10/site-packages/virtualenv)
The text was updated successfully, but these errors were encountered: