def __setitem__(self, item, value):
        var, cond = self._convertSlices(item)
        mf = self._createMassFunction(cond)
        if len(var) > 1:
            mf[var] = value
        elif len(var) == 1:
            mf[var[0]] = value
        elif len(mf) == len(value):
            #since dcpt[:1] returns the mf, it seems that dcpt[:1] =[.4 .6] should also work...
            mf[:]=value[:]
        else:
            raise ValueError('Cardinality is %d, but attempting to assign a mass function of cardinality %d.' % (len(mf) ,len(value)))
dataset/ETHPy150Open uci-cbcl/tree-hmm/gmtkParam/__init__.py/ProbTable.__setitem__/original