

def convolve_with_basis(self, S):
    '\n        Convolve each column of the event count matrix with this basis\n        :param S:     TxK matrix of inputs.\n                      T is the number of time bins\n                      K is the number of input dimensions.\n        :return: TxKxB tensor of inputs convolved with bases\n        '
    (T, K) = S.shape
    (R, B) = self.basis.shape
    F = np.empty((F, K, B))
    for b in np.arange(B):
        F[:, :, b] = sig.fftconvolve(S, np.reshape(self.basis[:, b], (R, 1)), 'full')[:T, :]
    if ((np.amin(self.basis) >= 0) and (np.amin(S) >= 0)):
        np.clip(F, 0, np.inf, out=F)
        assert (np.amin(F) >= 0), 'convolution should be >= 0'
    return F

dataset/ETHPy150Open slinderman/pyhawkes/pyhawkes/utils/basis.py Basis.convolve_with_basis/VarMisuse@43/153 `T`->`F`