dimod.binary.BinaryQuadraticModel.nbytes

BinaryQuadraticModel.nbytes(capacity: bool = False) int[source]

Get the total bytes consumed by the biases and indices.

Does not include the memory consumed by non-element attributes of the binary quadratic model object. Also does not include the memory consumed by the variable labels.

Parameters

capacity – If capacity is true, also include the capacity of the underlying vectors in the calculation.

Returns

The number of bytes.

Raises

TypeError – If dtype is object.