Skip to content

Commit

Permalink
FIX: Fix builds for latest scipy
Browse files Browse the repository at this point in the history
  • Loading branch information
mgrover1 committed Jun 25, 2024
1 parent fd26b49 commit df49236
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions pyart/retrieve/comp_z.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import numpy as np
from netCDF4 import num2date
from pandas import to_datetime
from scipy.interpolate import interp2d
from scipy.interpolate import RectBivariateSpline

from pyart.core import Radar

Expand Down Expand Up @@ -103,10 +103,10 @@ def composite_reflectivity(radar, field="reflectivity", gatefilter=None):

else:
# Configure the intperpolator
z_interpolator = interp2d(ranges, az, z, kind="linear")
z_interpolator = RectBivariateSpline(az, ranges, z)

# Apply the interpolation
z = z_interpolator(ranges, azimuth_final)
z = z_interpolator(azimuth_final, ranges)

# if first sweep, create new dim, otherwise concat them up
if sweep == minimum_sweep:
Expand Down
4 changes: 2 additions & 2 deletions tests/retrieve/test_comp_z.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import copy

import numpy as np
from numpy.testing import assert_array_equal, assert_equal
from numpy.testing import assert_array_almost_equal, assert_equal

import pyart

Expand Down Expand Up @@ -85,7 +85,7 @@ def test_composite_z():

# choose a random az
random_az = np.random.randint(0, 720)
assert_array_equal(
assert_array_almost_equal(
compz.fields["composite_reflectivity"]["data"][random_az, :],
np.arange(0, z.shape[1]),
)

0 comments on commit df49236

Please sign in to comment.