I have a NumPy array
[None, None, None, None, 1, 2, None, 4, None]
The output I want is
[1, 2, None, 4, None]
I wrote this while loop but there is something wrong I guess
index = 0
while(numpyArray[index] is None):
numpyArray = np.delete(numpyArray, index)
index += 1
The output I am getting is
[None, None, 1, 2, None, 4, None]