dwave.optimization.model.ArraySymbol.strides#

ArraySymbol.strides()#

Return the stride length, in bytes, for traversing a symbol.

Returns:

Tuple of the number of bytes to step in each dimension when traversing a symbol.

Examples

This example returns the size of an integer symbol.

>>> from dwave.optimization import Model
>>> model = Model()
>>> i = model.integer((2, 3), upper_bound=20)
>>> i.strides()
(24, 8)