def __div__(self, other):
        # assume other is scalar and do element-wise divison
        assert not isinstance(other, self.ctx.matrix)
        new = self.ctx.matrix(self.__rows, self.__cols)
        for i in xrange(self.__rows):
            for j in xrange(self.__cols):
                new[i,j] = other / self[i,j]
        return new
dataset/ETHPy150Open fredrik-johansson/mpmath/mpmath/matrices/matrices.py/_matrix.__div__/swapped operands of `/`