(self, matrix, key)
| 83 | |
| 84 | # Return the value at the given index in the matrix. |
| 85 | def index(self, matrix, key): |
| 86 | value = matrix[key] |
| 87 | # Reduce to a scalar if possible. |
| 88 | if cvxpy.interface.matrix_utilities.shape(value) == (1, 1): |
| 89 | return cvxpy.interface.matrix_utilities.scalar_value(value) |
| 90 | else: |
| 91 | return value |
| 92 | |
| 93 | # Coerce the matrix into the given shape. |
| 94 | @abc.abstractmethod |
no test coverage detected