@@ -8,7 +8,7 @@ class PSDMatrix(object):
88 A :class:`PSDMatrix` encodes a square matrix of :class:`Expression` objects that is constrained to be symmetric PSD.
99
1010 Attributes:
11- matrix_of_expressions (Iterable of Iterable of Expression): a square matrix of :class:`Expression` objects.
11+ matrix_of_expressions (2D ndarray of Expression): a square matrix of :class:`Expression` objects.
1212 shape (tuple of ints): the shape of the underlying matrix of :class:`Expression` objects.
1313 _value (2D ndarray of floats): numerical values of :class:`Expression` objects
1414 obtained after solving the PEP via SDP solver.
@@ -22,11 +22,12 @@ class PSDMatrix(object):
2222
2323 Example:
2424 >>> # Defining t <= sqrt(expr) for a given expression expr.
25+ >>> import numpy as np
2526 >>> from PEPit import Expression
2627 >>> from PEPit import PSDMatrix
2728 >>> expr = Expression()
2829 >>> t = Expression()
29- >>> psd_matrix = PSDMatrix(matrix_of_expressions=[[expr, t], [t, 1]])
30+ >>> psd_matrix = PSDMatrix(matrix_of_expressions=np.array( [[expr, t], [t, 1]]) )
3031 >>> # The last line means that the matrix [[expr, t], [t, 1]] is constrained to be PSD.
3132 >>> # This is equivalent to det([[expr, t], [t, 1]]) >= 0, i.e. expr - t^2 >= 0.
3233
@@ -40,7 +41,7 @@ def __init__(self, matrix_of_expressions):
4041 :class:`PSDMatrix` objects are instantiated via the following argument.
4142
4243 Args:
43- matrix_of_expressions (Iterable of Iterable of Expression): a square matrix of :class:`Expression`.
44+ matrix_of_expressions (2D ndarray of Expression): a square matrix of :class:`Expression`.
4445
4546 Instantiating the :class:`PSDMatrix` objects of the first example can be done by
4647
0 commit comments