diff options
Diffstat (limited to 'polymatrix/expression/init/initgetitemexpr.py')
-rw-r--r-- | polymatrix/expression/init/initgetitemexpr.py | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/polymatrix/expression/init/initgetitemexpr.py b/polymatrix/expression/init/initgetitemexpr.py deleted file mode 100644 index f7fc0c9..0000000 --- a/polymatrix/expression/init/initgetitemexpr.py +++ /dev/null @@ -1,22 +0,0 @@ -from numpy import isin -from polymatrix.expression.mixins.expressionbasemixin import ExpressionBaseMixin -import polymatrix.expression.impl.impl - - -def init_get_item_expr( - underlying: ExpressionBaseMixin, - index: tuple[tuple[int, ...], tuple[int, ...]], -): - - def get_hashable_slice(index): - if isinstance(index, slice): - return polymatrix.expression.impl.impl.GetItemExprImpl.Slice(start=index.start, stop=index.stop, step=index.step) - else: - return index - - proper_index = (get_hashable_slice(index[0]), get_hashable_slice(index[1])) - - return polymatrix.expression.impl.impl.GetItemExprImpl( - underlying=underlying, - index=proper_index, -) |