hildensia / bayesian_changepoint_detection

Methods to get the probability of a changepoint in a time series.
MIT License
670 stars 213 forks source link

Scipy Import Error on newer versions #29

Closed fhaselbeck closed 3 years ago

fhaselbeck commented 3 years ago

Hi guys,

there is an import issue if one uses newer scipy versions.

Would be a quick fix if you adapt the import statement at offline_changepoint_detection.py

try:  # SciPy >= 0.19
    from scipy.special import comb, logsumexp
except ImportError:
    from scipy.misc import comb, logsumexp  # noqa
hildensia commented 3 years ago

Would you mind sending a pull request?

On Thu, Mar 4, 2021, at 4:21 PM, fhaselbeck wrote:

Hi guys,

there is an import issue if one uses newer scipy versions.

Would be a quick fix if you adapt the import statement at offline_changepoint_detection.py

try: # SciPy >= 0.19 from scipy.special import comb, logsumexp except ImportError: from scipy.misc import comb, logsumexp # noqa — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/hildensia/bayesian_changepoint_detection/issues/29, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAVBVHCKIS2XI26KUMKPMTTB6QOZANCNFSM4YTOFD7Q.

fhaselbeck commented 3 years ago

I ust recognized that I installed an old version using pip. Error was already fixed: https://github.com/hildensia/bayesian_changepoint_detection/pull/22

Sorry for the misunderstanding