Example #1
0
 def __getitem__(self, key):
     """Return a slice/index into the expression.
     """
     # Returning self for scalars causes
     # the built-in sum to hang.
     if ku.is_special_slice(key):
         return types.index().get_special_slice(self, key)
     else:
         return types.index()(self, key)
Example #2
0
 def __getitem__(self, key):
     """Return a slice/index into the expression.
     """
     # Returning self for scalars causes
     # the built-in sum to hang.
     if ku.is_special_slice(key):
         return types.index().get_special_slice(self, key)
     else:
         return types.index()(self, key)
Example #3
0
 def __getitem__(self, key):
     """Return a slice/index into the expression.
     """
     # Indexing into a scalar returns the scalar.
     if self.is_scalar():
         return self
     else:
         return types.index()(self, key)
Example #4
0
 def __getitem__(self, key):
     """Return a slice/index into the expression.
     """
     # Indexing into a scalar returns the scalar.
     if self.is_scalar():
         return self
     else:
         return types.index()(self, key)
Example #5
0
 def __getitem__(self, key):
     """Return a slice/index into the expression.
     """
     # Returning self for scalars causes
     # the built-in sum to hang.
     return types.index()(self, key)