In another SO, this is a solution for adding a single zero between values in a numpy.array:
import numpy as np
arr = np.arange(1, 7) # array([1, 2, 3, 4, 5, 6])
np.insert(arr, slice(1, None, 2), 0) # array([1, 0, 2, 0, 3, 0, 4, 0, 5, 0, 6])
How would I add more zeros between each value in original array? For example, 5 zeros:
np.array([1, 0, 0, 0, 0, 0,
2, 0, 0, 0, 0, 0,
3, 0, 0, 0, 0, 0,
4, 0, 0, 0, 0, 0,
5, 0, 0, 0, 0, 0, 6])