Skip to content

Commit

Permalink
Merge pull request #284 from QuantEcon/quad_fix
Browse files Browse the repository at this point in the history
BUG: Change floats to ints in _qnwsimp1
  • Loading branch information
sglyon committed Feb 22, 2017
2 parents 840cafc + 6e721a8 commit c674557
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion quantecon/quad.py
Original file line number Diff line number Diff line change
Expand Up @@ -904,7 +904,7 @@ def _qnwsimp1(n, a, b):

nodes = np.linspace(a, b, n)
dx = nodes[1] - nodes[0]
weights = np.tile([2.0, 4.0], (n + 1.0) / 2.0)
weights = np.tile([2.0, 4.0], (n + 1) // 2)
weights = weights[:n]
weights[0] = weights[-1] = 1
weights = (dx / 3.0) * weights
Expand Down

0 comments on commit c674557

Please sign in to comment.