Skip to content

Commit

Permalink
Don't configure Numpy precision on doctests
Browse files Browse the repository at this point in the history
Remove lines that used to lower the Numpy's precision on docstring
examples. Doctests started to fail on Numpy v2.0.0 due to these lines.
  • Loading branch information
santisoler committed Aug 27, 2024
1 parent 75f8156 commit 4363bd2
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions verde/coordinates.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,9 +234,6 @@ def line_coordinates(
Examples
--------
>>> # Lower printing precision to shorten this example
>>> import numpy as np; np.set_printoptions(precision=2, suppress=True)
>>> values = line_coordinates(0, 5, spacing=2.5)
>>> print(values.shape)
(3,)
Expand Down Expand Up @@ -363,8 +360,6 @@ def grid_coordinates(
>>> east, north = grid_coordinates(region=(0, 5, 0, 10), shape=(5, 3))
>>> print(east.shape, north.shape)
(5, 3) (5, 3)
>>> # Lower printing precision to shorten this example
>>> import numpy as np; np.set_printoptions(precision=1, suppress=True)
>>> print(east)
[[0. 2.5 5. ]
[0. 2.5 5. ]
Expand Down

0 comments on commit 4363bd2

Please sign in to comment.