## Pad the arrays effectively using numpy.pad()

Have you ever come across a situation where you have to add a border to an array or a tensor? Wondering how to go about it? The answer is to use the numpy.pad() The NumPy module has a function named pad() that can be used to pad certain values to the array. In this article, let us discuss the numpy.pad() function and also explore different ways of using it. What is Padding an Array? Padding means adding some contents to the border of an array. After padding the array, the array would have a different size. But same dimensions. Have … Read more