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

BUG: preliz import might break pymc import via scipy #7631

Closed
dirknbr opened this issue Jan 3, 2025 · 3 comments
Closed

BUG: preliz import might break pymc import via scipy #7631

dirknbr opened this issue Jan 3, 2025 · 3 comments
Labels

Comments

@dirknbr
Copy link

dirknbr commented Jan 3, 2025

Describe the issue:

This is via a colab

I suspect that preliz install breaks some of the pymc dependencies

Reproduceable code example:

import arviz as az
import bayeux as bx
import jax
import matplotlib.pyplot as plt
import numpy as np
import tensorflow_probability.substrates.jax as tfp
import pymc as pm
from scipy import stats
import preliz

tfd = tfp.distributions

Error message:

ImportError                               Traceback (most recent call last)

<ipython-input-5-6bd83c27ee19> in <cell line: 7>()
      5 import numpy as np
      6 import tensorflow_probability.substrates.jax as tfp
----> 7 import pymc as pm
      8 from scipy import stats
      9 import preliz

4 frames

/usr/local/lib/python3.10/dist-packages/scipy/cluster/vq.py in <module>
     68 import numpy as np
     69 from collections import deque
---> 70 from scipy._lib._array_api import (
     71     as_xparray, array_namespace, size, atleast_nd, copy, cov
     72 )

ImportError: cannot import name 'as_xparray' from 'scipy._lib._array_api' (/usr/local/lib/python3.10/dist-packages/scipy/_lib/_array_api.py)

PyMC version information:

see above

Context for the issue:

No response

@dirknbr dirknbr added the bug label Jan 3, 2025
@ricardoV94
Copy link
Member

Can you share a colab? Perhaps preliz is not pinning scipy well enough? CC @aloctavodia

@dirknbr
Copy link
Author

dirknbr commented Jan 3, 2025

It seems I cannot reproduce it myself, so maybe we can close it

https://colab.research.google.com/drive/1ZNPl0SM8DgXLK8IVUN9mSl0yr80YVYmw#scrollTo=AhcnyHugbi0o

@aloctavodia
Copy link
Member

Just for reference PyMC asks for scipy>=1.4.1 and PreliZ "scipy>=1.10, <1.13"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants