예제 #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)
예제 #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)
예제 #3
0
파일: expression.py 프로젝트: gte620v/cvxpy
 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)
예제 #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)
예제 #5
0
파일: expression.py 프로젝트: giserh/cvxpy
 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)