How can I fill out a Python string with spaces?
I want to fill out a string with spaces. I know that the following works for zero’s:
I want to fill out a string with spaces. I know that the following works for zero’s:
I want to know how I can pad a 2D numpy array with zeros using python 2.6.6 with numpy version 1.5.0. But these are my limitations. Therefore I cannot use np.pad. For example, I want to pad a with zeros such that its shape matches b. The reason why I want to do this is so I can do: