Skip to content

Commit

Permalink
row and col dim index props
Browse files Browse the repository at this point in the history
  • Loading branch information
kwypchlo committed Jun 15, 2018
1 parent b7d996e commit 455daad
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/cr/cube/crunch_cube.py
Original file line number Diff line number Diff line change
Expand Up @@ -571,6 +571,22 @@ def dim_types(self):
def ndim(self):
return len(self.dimensions)

@lazyproperty
def row_dim_ind(self):
"""
Index of the row dimension in the cube
:rtype: int
"""
return 0 if self.ndim < 3 else 1

@lazyproperty
def col_dim_ind(self):
"""
Index of the column dimension in the cube
:rtype: int
"""
return 1 if self.ndim < 3 else 2

@lazyproperty
def ind_selected(self):
return self._get_mr_slice()
Expand Down

0 comments on commit 455daad

Please sign in to comment.