In [1]: import dimod
In [2]: bqm = dimod.BQM({'a': 1, 'b': 2}, {'ab': 1}, 1.5, 'SPIN')
In [3]: bqm.variables[:1]
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-3-10b8e511cd1e> in <module>
----> 1 bqm.variables[:1]
~/projects/ocean/dimod/dimod/cyvariables.pyx in dimod.cyvariables.cyVariables.__getitem__()
48
49 # todo: support slices
---> 50 def __getitem__(self, Py_ssize_t idx):
51 return self.at(idx)
52
TypeError: 'slice' object cannot be interpreted as an integer
it would be nice if instead we got a list.
it would be nice if instead we got a list.