dwave.optimization.model.ArraySymbol.size#
- ArraySymbol.size()#
Return the number of elements in the symbol.
-1
indicates a variable number of elements.Examples
This example checks the size of a \(2 \times 3\) binary symbol.
>>> from dwave.optimization import Model >>> model = Model() >>> x = model.binary((2, 3)) >>> x.size() 6