Skip to content
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
2 changes: 1 addition & 1 deletion lib/iris/tests/results/netcdf/int64_data_netcdf3.cml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" ?>
<cubes xmlns="urn:x-iris:cubeml-0.2">
<cube core-dtype="float64" dtype="int32" standard_name="surface_temperature" units="K" var_name="temp">
<cube core-dtype="int32" dtype="int32" standard_name="surface_temperature" units="K" var_name="temp">
<attributes>
<attribute name="Conventions" value="CF-1.5"/>
</attributes>
Expand Down
2 changes: 1 addition & 1 deletion lib/iris/tests/results/netcdf/netcdf_units_0.cml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" ?>
<cubes xmlns="urn:x-iris:cubeml-0.2">
<cube core-dtype="float64" dtype="int32" standard_name="air_temperature" units="kelvin" var_name="cube_0">
<cube core-dtype="int32" dtype="int32" standard_name="air_temperature" units="kelvin" var_name="cube_0">
<coords>
<coord>
<dimCoord id="f1596e20" points="[100]" shape="(1,)" standard_name="height" units="Unit('meters')" value_type="int32" var_name="height"/>
Expand Down
2 changes: 1 addition & 1 deletion lib/iris/tests/results/netcdf/uint32_data_netcdf3.cml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" ?>
<cubes xmlns="urn:x-iris:cubeml-0.2">
<cube core-dtype="float64" dtype="int32" standard_name="surface_temperature" units="K" var_name="temp">
<cube core-dtype="int64" dtype="int32" standard_name="surface_temperature" units="K" var_name="temp">
<attributes>
<attribute name="Conventions" value="CF-1.5"/>
</attributes>
Expand Down
4 changes: 1 addition & 3 deletions lib/iris/tests/test_pickling.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,7 @@ def pickle_then_unpickle(self, obj):
def _real_data(cube):
# Get the concrete data of the cube for performing data values
# comparison checks.
return as_concrete_data(cube.core_data(),
nans_replacement=cube.fill_value,
result_dtype=cube.dtype)
return as_concrete_data(cube.core_data())

def assertCubeData(self, cube1, cube2):
self.assertArrayEqual(self._real_data(cube1), self._real_data(cube2))
Expand Down
8 changes: 4 additions & 4 deletions lib/iris/tests/unit/analysis/test_MEAN.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,21 +43,21 @@ def setUp(self):

def test_mdtol_default(self):
agg = MEAN.lazy_aggregate(self.array, axis=self.axis)
masked_result = as_concrete_data(agg, nans_replacement=ma.masked)
masked_result = as_concrete_data(agg)
self.assertMaskedArrayAlmostEqual(masked_result,
self.expected_masked)

def test_mdtol_below(self):
agg = MEAN.lazy_aggregate(self.array, axis=self.axis, mdtol=0.3)
masked_result = as_concrete_data(agg, nans_replacement=ma.masked)
masked_result = as_concrete_data(agg)
expected_masked = self.expected_masked
expected_masked.mask = [False, True, True, True]
self.assertMaskedArrayAlmostEqual(masked_result,
expected_masked)

def test_mdtol_above(self):
agg = MEAN.lazy_aggregate(self.array, axis=self.axis, mdtol=0.4)
masked_result = as_concrete_data(agg, nans_replacement=ma.masked)
masked_result = as_concrete_data(agg)
self.assertMaskedArrayAlmostEqual(masked_result,
self.expected_masked)

Expand All @@ -66,7 +66,7 @@ def test_multi_axis(self):
collapse_axes = (0, 2)
lazy_data = as_lazy_data(data)
agg = MEAN.lazy_aggregate(lazy_data, axis=collapse_axes)
result = as_concrete_data(agg, nans_replacement=ma.masked)
result = as_concrete_data(agg)
expected = np.mean(data, axis=collapse_axes)
self.assertArrayAllClose(result, expected)

Expand Down