Skip to content

Commit

Permalink
FIX: Import scipy.sparse.linalg
Browse files Browse the repository at this point in the history
Fix #481
  • Loading branch information
oyamad committed Apr 12, 2019
1 parent 3029221 commit ac3b6ab
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion quantecon/markov/ddp.py
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,8 @@ def s_wise_max(vals, out=None, out_argmax=None):

# Linear equation solver to be used in evaluate_policy
if self._sparse:
self._lineq_solve = sp.linalg.spsolve
import scipy.sparse.linalg
self._lineq_solve = scipy.sparse.linalg.spsolve
self._I = sp.identity(self.num_states, format='csr')
else:
self._lineq_solve = np.linalg.solve
Expand Down

0 comments on commit ac3b6ab

Please sign in to comment.