Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

add padding to 2d matrix p


result = np.zeros(b.shape)
# actually you can also use result = np.zeros_like(b) 
# but that also copies the dtype not only the shape

Source by devarama.com #
 
PREVIOUS NEXT
Tagged: #add #padding #matrix
ADD COMMENT
Topic
Name
2+4 =