Is there a vectorized assigment of elements to sequences in numpy like in this discussion?
for instance:
xx = np.array([1,2], dtype=object)
expanded = np.arange(xx, xx+2)
instead of loops:
xx = np.array([1,2], dtype=object)
expanded = np.array([np.arange(x, x+2) for x in xx]).flatten()
This would be for mapping a scalar heuristic to the neighboring cells in a matrix that determined it (e.g. the range of cells that had the peak overlap from a correlation()
operation).