Skip to content

Commit

Permalink
removed all ruff errors
Browse files Browse the repository at this point in the history
  • Loading branch information
winash12 committed Jul 17, 2024
1 parent 04e474d commit 09ebd28
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/calc/test_calc_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -1568,9 +1568,9 @@ def test_bounding_box_mask():
temperature = 273 + 20 * np.random.random([4, 17, 73, 144])

Check failure on line 1568 in tests/calc/test_calc_tools.py

View workflow job for this annotation

GitHub Actions / Flake8

[ruff] reported by reviewdog 🐶 NPY002 Replace legacy `np.random.random` call with `np.random.Generator` Raw Output: tests/calc/test_calc_tools.py:1568:30: NPY002 Replace legacy `np.random.random` call with `np.random.Generator`
latitude = np.linspace(-90., 90., 73)
longitude = np.linspace(0., 360., 144, endpoint=False)
pres = ['1000', '925', '850', '700', '600', '500', '400', '300', '250',
press = ['1000', '925', '850', '700', '600', '500', '400', '300', '250',
'200', '150', '100', '70', '50', '30', '20', '10']
level = np.array(pres)
level = np.array(press)
level = level.astype(float) * 100
time = np.empty((4))
time[0] = np.datetime64(datetime.datetime(2023, 1, 14, 0))
Expand All @@ -1596,9 +1596,9 @@ def test_find_bounding_box_indices():
temperature = 273 + 20 * np.random.random([4, 17, 73, 144])
latitude = np.linspace(-90., 90., 73)
longitude = np.linspace(0., 360., 144, endpoint=False)
pres = ['1000', '925', '850', '700', '600', '500', '400', '300', '250',
press = ['1000', '925', '850', '700', '600', '500', '400', '300', '250',
'200', '150', '100', '70', '50', '30', '20', '10']
level = np.array(pres)
level = np.array(press)
level = level.astype(float) * 100
time = np.empty((4))
time[0] = np.datetime64(datetime.datetime(2023, 1, 14, 0))
Expand Down Expand Up @@ -1626,9 +1626,9 @@ def test_get_vectorized_array_indices():
temperature = 273 + 20 * np.random.random([4, 17, 73, 144])
latitude = np.linspace(-90., 90., 73)
longitude = np.linspace(0., 360., 144, endpoint=False)
pres = ['1000', '925', '850', '700', '600', '500', '400', '300', '250',
press = ['1000', '925', '850', '700', '600', '500', '400', '300', '250',
'200', '150', '100', '70', '50', '30', '20', '10']
level = np.array(pres)
level = np.array(press)
level = level.astype(float) * 100
time = np.empty((4))
time[0] = np.datetime64(datetime.datetime(2023, 1, 14, 0))
Expand Down

0 comments on commit 09ebd28

Please sign in to comment.