dimod
dimod copied to clipboard
Add keyword argument(s) to `QM.energies` and `BQM.energies` to force stricter input checking
A user may wish to test whether the given sample(s):
- Have exactly matching variables
- Have the correct values for the given variable vartype(s)
Something like
bqm.energies(samples, check_vartypes=True, check_variables=True)
or more simply
bqm.energies(samples, strict=True)
Additional Context Originally discussed as part of https://github.com/dwavesystems/dimod/issues/949 (1) is covered by https://github.com/dwavesystems/dimod/issues/244
~Closed by #1010~ oops, wrong issue