dimod.concatenate#
- concatenate(samplesets, defaults=None)[source]#
Combine sample sets.
- Parameters:
- Returns:
A sample set with the same vartype and variable order as the first given in samplesets.
- Return type:
Examples
>>> a = dimod.SampleSet.from_samples(([-1, +1], 'ab'), dimod.SPIN, energy=-1) >>> b = dimod.SampleSet.from_samples(([-1, +1], 'ba'), dimod.SPIN, energy=-1) >>> ab = dimod.concatenate((a, b)) >>> ab.record.sample array([[-1, 1], [ 1, -1]], dtype=int8)