dimod.binary.BinaryQuadraticModel.degrees#
- BinaryQuadraticModel.degrees(array: bool = False, dtype: DTypeLike = <class 'int'>) ndarray | Mapping[Hashable, int][source]#
Return the degrees of a binary quadratic model’s variables.
- Parameters:
array – If True, returns a
numpy.ndarray; otherwise returns a dict.dtype – The data type of the returned degrees. Applies only if
array==True.
- Returns:
Degrees of all variables.