From dc8091da2fde2e4e4e86c56443f8909cdc95d252 Mon Sep 17 00:00:00 2001 From: Tim Widrick Date: Sat, 12 Mar 2022 16:45:35 -0500 Subject: [PATCH] update references so scipy>=1.8 is okay --- pyyeti/expmint.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/pyyeti/expmint.py b/pyyeti/expmint.py index 8d57bd8..66bfedc 100644 --- a/pyyeti/expmint.py +++ b/pyyeti/expmint.py @@ -5,7 +5,7 @@ import warnings import numpy as np -import scipy.sparse.linalg.matfuncs as mf +import scipy.sparse.linalg as spla import scipy.linalg as la @@ -15,6 +15,14 @@ except TypeError: pass +mf = spla.matfuncs +try: + # scipy version 1.7 or older? + mf._ExpmPadeHelper +except AttributeError: + # scipy version 1.8 or newer + mf = spla._matfuncs + class _ExpmIntPadeHelper(mf._ExpmPadeHelper): def __init__(self, A, structure=None, use_exact_onenorm=False):