Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX: Fix builds for latest scipy #1604

Merged
merged 1 commit into from
Jun 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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]),
)