Skip to content

Commit 3bf59e7

Browse files
Transurgeonclaude
andcommitted
Move sample_bounds docs from #: comments into Variable class docstring
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent be3270d commit 3bf59e7

1 file changed

Lines changed: 10 additions & 10 deletions

File tree

cvxpy/expressions/variable.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@
1818
from typing import TYPE_CHECKING, Any, Iterable, Optional, Tuple
1919

2020
if TYPE_CHECKING:
21-
import numpy as np
22-
2321
from cvxpy.expressions.constants.parameter import Parameter
2422

2523
import scipy.sparse as sp
@@ -33,14 +31,16 @@
3331

3432

3533
class Variable(Leaf):
36-
"""The optimization variables in a problem."""
37-
38-
#: Explicit bounds for random initial point sampling in ``best_of`` NLP solves.
39-
#: A tuple ``(low, high)`` of array_like values broadcastable to the variable shape,
40-
#: or ``None``. When set, overrides the variable's ``value`` during random
41-
#: initialization. When ``None`` and finite ``bounds`` are present, those are
42-
#: used instead. See :meth:`Problem.set_random_NLP_initial_point`.
43-
sample_bounds: tuple[np.ndarray, np.ndarray] | None
34+
"""The optimization variables in a problem.
35+
36+
Attributes
37+
----------
38+
sample_bounds : tuple[np.ndarray, np.ndarray] | None
39+
Explicit bounds ``(low, high)`` for random initial point sampling in
40+
``best_of`` NLP solves. When set, overrides the variable's ``value``
41+
during random initialization. When ``None`` and finite ``bounds`` are
42+
present, those are used instead.
43+
"""
4444

4545
def __init__(
4646
self, shape: int | Iterable[int] = (), name: str | None = None,

0 commit comments

Comments
 (0)