dwave.optimization.model.Model.constant#

Model.constant(array_like)#

Create a constant symbol.

Parameters:

array_like – An array-like representing a constant. Can be a scalar or a NumPy array. If the array’s dtype is np.double, the array is not copied.

Returns:

A constant symbol.

Examples

This example creates a \(1 \times 4\)-sized constant symbol with the specified values.

>>> from dwave.optimization.model import Model
>>> model = Model()
>>> time_limits = model.constant([10, 15, 5, 8.5])