Skip to content

Commit

Permalink
Merge branch 'deck-shim-159447397' into rel-5.2.276
Browse files Browse the repository at this point in the history
  • Loading branch information
Crunch.io Jenkins Account committed Aug 23, 2018
2 parents c329763 + 20e4d73 commit ddbf93d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/cr/cube/crunch_cube.py
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,9 @@ def _inserted_dim_inds(self, transform_dims, axis):
def _margin_pruned_indices(margin, inserted_ind, axis):
pruned_ind = np.logical_or(margin == 0, np.isnan(margin))

if pruned_ind.ndim == 0:
pruned_ind = np.array([pruned_ind])

if np.any(margin) and inserted_ind is not None and any(inserted_ind):
ind_inserted = np.zeros(pruned_ind.shape, dtype=bool)
if len(pruned_ind.shape) == 2 and axis == 1:
Expand Down Expand Up @@ -847,7 +850,11 @@ def hs_dims_for_den(hs_dims, axis):
inflate_ind = [
(
None
if d.is_mr_selections(self.all_dimensions) or n <= 1 else
if (
d.is_mr_selections(self.all_dimensions) or
n <= 1 or
len(d.elements()) <= 1
) else
slice(None)
)
for d, n in zip(self.all_dimensions, table.shape)
Expand Down

0 comments on commit ddbf93d

Please sign in to comment.