def __init__()

in svinfer/processor/matrix.py [0:0]


    def __init__(self, x, dim=None):
        assert isinstance(x, np.ndarray)
        super(NumpyMatrix, self).__init__()
        if len(x.shape) == 1:
            x = x[:, np.newaxis]
        self.value = x
        self.ncol = x.shape[1]
        if dim is None:
            dim = (self.ncol, )
        else:
            assert np.prod(dim) == self.ncol
        self.dim = dim