Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
4 changes: 0 additions & 4 deletions lib/iris/_merge.py
Original file line number Diff line number Diff line change
Expand Up @@ -1239,10 +1239,6 @@ def merge(self, unique=True):
# normal array.
dtype = self._cube_signature.data_type
merged_data = as_concrete_data(merged_data)
# Unmask the array if it has no masked points.
if (ma.isMaskedArray(merged_data) and
not ma.is_masked(merged_data)):
merged_data = merged_data.data
merged_cube = self._get_cube(merged_data)
merged_cubes.append(merged_cube)

Expand Down
2 changes: 0 additions & 2 deletions lib/iris/analysis/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1050,8 +1050,6 @@ def _percentile(data, axis, percent, fast_percentile_method=False,
quantiles = np.array(percent) / 100.
result = scipy.stats.mstats.mquantiles(data, quantiles, axis=-1,
**kwargs)
if not ma.isMaskedArray(data) and not ma.is_masked(result):
result = np.asarray(result)

# Ensure to unflatten any leading dimensions.
if shape:
Expand Down
5 changes: 0 additions & 5 deletions lib/iris/cube.py
Original file line number Diff line number Diff line change
Expand Up @@ -2094,11 +2094,6 @@ def new_cell_measure_dims(cm_):
# We don't want a view of the data, so take a copy of it.
data = deepcopy(data)

# We can turn a masked array into a normal array if it's full.
if ma.isMaskedArray(data):
if ma.count_masked(data) == 0:
data = data.filled()

# XXX: Slicing a single item from a masked array that is masked,
# results in numpy (v1.11.1) *always* returning a MaskedConstant
# with a dtype of float64, regardless of the original masked
Expand Down
4 changes: 0 additions & 4 deletions lib/iris/experimental/regrid_conservative.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,10 +274,6 @@ def _valid_units(coord):
# Paste regridded slice back into parent array
fullcube_data[slice_indices_tuple] = data

# Remove the data mask if completely unused.
if not np.ma.is_masked(fullcube_data):
fullcube_data = np.array(fullcube_data)

# Generate a full 2d sample grid, as required for regridding orography
# NOTE: as seen in "regrid_bilinear_rectilinear_src_and_grid"
# TODO: can this not also be wound into the _create_cube method ?
Expand Down