dimod.higherorder.polynomial.BinaryPolynomial.energies

BinaryPolynomial.energies(samples_like, dtype=<class 'float'>)[source]

The energies of the given samples.

Parameters:
  • samples_like (samples_like) – A collection of raw samples. samples_like is an extension of NumPy’s array_like structure. See as_samples().
  • dtype (numpy.dtype, optional) – The data type of the returned energies. Defaults to float.
Returns:

The energies.

Return type:

numpy.ndarray