Skip to content

Commit

Permalink
TST: Increase dtype of sample data calculations
Browse files Browse the repository at this point in the history
This helps avoid some floating point differences in the
image tests.
  • Loading branch information
greglucas committed Jan 6, 2022
1 parent 3efcecb commit 7c71977
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/cartopy/tests/mpl/test_caching.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
def sample_data(shape=(73, 145)):
"""Return ``lons``, ``lats`` and ``data`` of some fake data."""
nlats, nlons = shape
lats = np.linspace(-np.pi / 2, np.pi / 2, nlats)
lons = np.linspace(0, 2 * np.pi, nlons)
lats = np.linspace(-np.pi / 2, np.pi / 2, nlats, dtype=np.longdouble)
lons = np.linspace(0, 2 * np.pi, nlons, dtype=np.longdouble)
lons, lats = np.meshgrid(lons, lats)
wave = 0.75 * (np.sin(2 * lats) ** 8) * np.cos(4 * lons)
mean = 0.5 * np.cos(2 * lats) * ((np.sin(2 * lats)) ** 2 + 2)
Expand Down

0 comments on commit 7c71977

Please sign in to comment.