dimod.drop_variables#

drop_variables(sampleset: SampleSet, variables: Iterable[Hashable]) SampleSet[source]#

Return a new sample set with the given variables removed.

Parameters:
  • sampleset – A sample set.

  • variables – The variables to be dropped. Can contain variables not in the sample set.

Returns:

A new sampleset without the given variables. The energies, info and other data vectors will be the same as in the given sample set.