Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_nearest(self):
self._test(core.cartesian.Nearest3D(), "mss_cartesian_nearest3d")
def test_bilinear(self):
self._test(core.cartesian.Bilinear3D(), "mss_cartesian_bilinear3d")
def test_idw(self):
self._test(core.cartesian.InverseDistanceWeighting3D(),
"mss_cartesian_idw3d")
def test_nearest(self):
self._test(core.cartesian.Nearest2D(), "mss_cartesian_nearest")
def _load_data(cls):
with netCDF4.Dataset(cls.GRID) as ds:
z = ds.variables['mss'][:].T
z[z.mask] = float("nan")
return core.cartesian.Bivariate(
core.Axis(ds.variables['lon'][:], is_circle=True),
core.Axis(ds.variables['lat'][:]), z.data)
def _load_data(cls):
with netCDF4.Dataset(cls.GRID) as ds:
z = ds.variables['tcw'][:].T
z[z.mask] = float("nan")
return core.cartesian.Trivariate(
core.Axis(ds.variables['longitude'][:], is_circle=True),
core.Axis(ds.variables['latitude'][:]),
core.Axis(ds.variables['time'][:]), z.data)