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

quad: Import sympy only when necessary #459

Merged
merged 4 commits into from
Dec 14, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
quad: Import sympy only when necessary
  • Loading branch information
rht committed Dec 11, 2018
commit 875524321c6c9a7c6df13a25126c6de240eb95fc
2 changes: 1 addition & 1 deletion quantecon/quad.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
import numpy as np
import scipy.linalg as la
from numba import jit, vectorize
import sympy as sym
from .ce_util import ckron, gridmake
from .util import check_random_state

Expand Down Expand Up @@ -141,6 +140,7 @@ def qnwequi(n, a, b, kind="N", equidist_pp=None, random_state=None):
random_state = check_random_state(random_state)

if equidist_pp is None:
import sympy as sym
equidist_pp = np.sqrt(np.array(list(sym.primerange(0, 7920))))

n, a, b = list(map(np.atleast_1d, list(map(np.asarray, [n, a, b]))))
Expand Down