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

FIX: Updates for Numba 0.49.0 #531

Merged
merged 4 commits into from
Apr 21, 2020
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
Prev Previous commit
Next Next commit
FIX: Fix errors in tests for quad.py when Numba 0.49.0 is used
  • Loading branch information
QBatista committed Apr 21, 2020
commit 215dee3357093fc6c90d9e08cc177e8881b1dc1e
7 changes: 5 additions & 2 deletions quantecon/quad.py
Original file line number Diff line number Diff line change
Expand Up @@ -784,7 +784,9 @@ def _qnwlege1(n, a, b):
p2 = p1
p1 = ((2 * j - 1) * z * p2 - (j - 1) * p3) / j

pp = n * (z * p1 - p2)/(z * z - 1.0)
top = n * (z * p1 - p2)
bottom = z ** 2 - 1.0
pp = top / bottom # https://github.com/QuantEcon/QuantEcon.py/issues/530
z1 = z.copy()
z = z1 - p1/pp
if np.all(np.abs(z - z1) < 1e-14):
Expand All @@ -796,7 +798,8 @@ def _qnwlege1(n, a, b):
nodes[i] = xm - xl * z
nodes[- i - 1] = xm + xl * z

weights[i] = 2 * xl / ((1 - z * z) * pp * pp)
# https://github.com/QuantEcon/QuantEcon.py/issues/530
weights[i] = 2 * xl / ((1 - z ** 2) * pp * pp)
weights[- i - 1] = weights[i]

return nodes, weights
Expand Down