Пример #1
0
def convolve(f, g, mode='full', axes=None):
    '''Perform a convolution along given axes'''
    if mode == 'same':
        return _signal.convolveToSameShape(_asf(f)._jdataset(), _asf(g)._jdataset(), axes)
    elif mode == 'valid':
        return _signal.convolveForOverlap(_asf(f)._jdataset(), _asf(g)._jdataset(), axes)
    elif mode == 'full':
        return _signal.convolve(_asf(f)._jdataset(), _asf(g)._jdataset(), axes)
    raise ValueError, 'mode keyword has unrecognised value'
Пример #2
0
def convolve(f, g, axes=None):
    '''Perform a convolution along given axes'''
    return _signal.convolve(f, g, axes)