I have a 1D array and I want to rotate it around its centre to generate a symmetric 2D array. How can I do it?
For example, I define a 1D window array via scipy and now I want to generate its 2D version which has rotation symmetry. However, the result of numpy.outer doesn't have rotation symmetry.
from scipy.signal import windows
import matplotlib.pyplot as plt
exp1 = windows.get_window(('exponential', None, 5), 60)
exp2d = np.sqrt(np.outer(exp1, exp1))
plt.imshow(exp2d)
I realize that if the 1D window has a analytical form, it is simple to do it. However, is there some general method for an arbitrary 1D array (function) without analytical form?


