python how to pad numpy array with zeros
NumPy 1.7.0 (when numpy.pad was added) is pretty old now (it was released in 2013) so even though the question asked for a way without using that function I thought it could be useful to know how that could be achieved using numpy.pad. It’s actually pretty simple: >>> import numpy as np >>> a = … Read more