Skip to content
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

scipy python version dependency errors #3355

Open
ajpotts opened this issue Jun 24, 2024 · 1 comment
Open

scipy python version dependency errors #3355

ajpotts opened this issue Jun 24, 2024 · 1 comment
Assignees
Milestone

Comments

@ajpotts
Copy link
Contributor

ajpotts commented Jun 24, 2024

Hi Amanda, I've got some notes on what I'm seeing here:
This seems to be causing failures for me, both in CI and locally, for some of the SciPy tests. Oddly, it seems to behave differently for Python 3.10 and 3.11.
Here is what I'm seeing (output truncated):
Python 3.11

$ python3 -m pytest tests/scipy/scipy_test.py -k "test_power_divergence"
platform darwin -- Python 3.11.7, pytest-7.2.1, pluggy-1.0.0


tests/scipy/scipy_test.py .                        [100%]

============ 1 passed, 1 deselected in 6.21s =============

Python 3.10

$ python3.10 -m pytest tests/scipy/scipy_test.py -k "test_power_divergence"
============================= test session starts ==============================

tests/scipy/scipy_test.py F                                              [100%]

=================================== FAILURES ===================================
_______________________ StatsTest.test_power_divergence ________________________
>                   assert np.allclose(ak_power_div, scipy_power_div, equal_nan=True)
E                   assert False
E                    +  where False = <function allclose at 0x106e1bbf0>(Power_divergenceResult(statistic=67.8313215\
1610018, pvalue=nan), Power_divergenceResult(statistic=67.83132151610016, pvalue=0.0), equal_nan=True)
E                    +    where <function allclose at 0x106e1bbf0> = np.allclose

tests/scipy/scipy_test.py:55: AssertionError
=========================== short test summary info ============================
FAILED tests/scipy/scipy_test.py::StatsTest::test_power_divergence - assert F...
================= 1 failed, 1 deselected, 7 warnings in 5.64s ==================

I am inclined to believe that this is a dependency versioning issue, but it doesn't make a lot of sense to me and I'm not quite sure how to proceed from here (edited)

@ajpotts
Copy link
Contributor Author

ajpotts commented Jun 28, 2024

I researched this a bit and the problem is that the power_divergence function in scipy underwent a non-trivial refactor in scipy 1.14.0. We would need to refactor that function to match the new one. In the new version, sometimes a p-values of nan becomes a value of 0.

@ajpotts ajpotts added this to the Arkouda Scipy milestone Jul 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant