You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Additional Context
This can currently be done "manually"
# Get the samples as an unlabelled array, but with the columns ordered by variable_ordersamples_array=sampleset.samples(sorted_by=None)[:, variable_order]
# Construct a new sampleset with that array and variable order, keeping everything else the# samereordered_sampleset=dimod.SampleSet.from_samples(
(samples_array, variable_order), # the samples array, with the new ordervartype=sampleset.vartype, # vartype is the samesort_labels=False, # don't sort the labels**sampleset.data_vectors, # energy, num_occurances, etc are all the same
)
but it might be nice to have it all bundled into a method
The text was updated successfully, but these errors were encountered:
I second this, it would be great to have this so that pedagogical notebooks intended for youngsters such as this one (see the confusing reordering in cell Out [7]) do not have too complicated code.
It would be good to have something like
Additional Context
This can currently be done "manually"
but it might be nice to have it all bundled into a method
The text was updated successfully, but these errors were encountered: