Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

numpy convolution stride tricks

import numpy as np
from numpy.lib import stride_tricks
x = np.arange(20).reshape([4, 5])
xx = stride_tricks.as_strided(x, shape=(2, 3, 3, 3), strides=x.strides + x.strides)
Source by scipy-cookbook.readthedocs.io #
 
PREVIOUS NEXT
Tagged: #numpy #convolution #stride #tricks
ADD COMMENT
Topic
Name
2+1 =