arvoelke / nengolib

Nengo library of additional extensions
Other
29 stars 6 forks source link

ImportError with Scipy 1.0.0 #129

Closed jgosmann closed 6 years ago

jgosmann commented 7 years ago

I'm getting an import error for from nengolib.synapses import ss2sim on Mac OS with Scipy 1.0.0 (and Python 3.6.3):

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-6-e61b386023cd> in <module>()
----> 1 from nengolib.synapses import ss2sim

~/.virtualenvs/nengodev/lib/python3.6/site-packages/nengolib/__init__.py in <module>()
     31 
     32 from . import compat
---> 33 from . import networks
     34 from . import processes  # this is a file, not a module
     35 from . import signal

~/.virtualenvs/nengodev/lib/python3.6/site-packages/nengolib/networks/__init__.py in <module>()
     13 
     14 from .echo_state import *
---> 15 from .linear_network import *
     16 from .reservoir import *
     17 from .rolling_window import *

~/.virtualenvs/nengodev/lib/python3.6/site-packages/nengolib/networks/linear_network.py in <module>()
     10 
     11 from nengolib.network import Network
---> 12 from nengolib.signal.realizers import Hankel
     13 from nengolib.signal.system import LinearSystem
     14 from nengolib.synapses.mapping import ss2sim

~/.virtualenvs/nengodev/lib/python3.6/site-packages/nengolib/signal/__init__.py in <module>()
     81 from .dists import *
     82 from .learning import *
---> 83 from .lyapunov import *
     84 from .realizers import *
     85 from .reduction import *

~/.virtualenvs/nengodev/lib/python3.6/site-packages/nengolib/signal/lyapunov.py in <module>()
      1 import numpy as np
----> 2 from scipy.linalg import (solve_lyapunov, solve_discrete_lyapunov, eig,
      3                           cholesky, svd)
      4 from scipy.optimize import fminbound
      5 

ImportError: cannot import name 'solve_lyapunov'
arvoelke commented 7 years ago

Missed this email. Thanks for catching. @psipeter says reverting to scipy 0.19.x fixed the issue for now.

arvoelke commented 6 years ago

Note: This was not supposed to break backwards compatibility. The release notes for SciPy 1.0.0 state "The old name is kept for backwards-compatibility." however they forgot to expose that alias via __all__. This has been fixed by https://github.com/scipy/scipy/pull/8082 and merged into scipy master. I will still add a work-around for the time being.

arvoelke commented 6 years ago

FYI this is fixed in release 0.4.1.