dimod.SampleSet.record

SampleSet.record

numpy.recarray containing the samples, energies, number of occurences, and other sample data.

Examples

>>> sampler = dimod.ExactSolver()
>>> sampleset = sampler.sample_ising({'a': -0.5, 'b': 1.0}, {('a', 'b'): -1.0})
>>> sampleset.record.sample     # doctest: +SKIP
array([[-1, -1],
       [ 1, -1],
       [ 1,  1],
       [-1,  1]], dtype=int8)
>>> len(sampleset.record.energy)
4