I want to append my numpy.array files. So I made code but it has error
I want to append by this code below. This form works well.
but the problem occur with using for loop
coordi_1 = mix(coord_0, coord_1, axis=0)
coordi_2 = mix(coord_1, coord_2, axis=0)
coordi_3 = mix(coord_2, coord_3, axis=0)
for i in range(0,191):
coord_i = np.load(''+st[i].id+'.npy')
print(coord_i)
if i == 0:
continue
else:
coordi_i = mix(coord_i-1, coord_i, axis=0)
The error massage is
ufunc 'subtract' did not contain a loop with signature matching types dtype('<U7') dtype('<U7') dtype('<U7')
and there is another code
for i in range(0,7941):
if cola[i,1] == '':
cola=np.delete(cola, i, axis=0)
i = i-1
I want to apply i-1 because after the one row is deleted,
This array miss a row next to the deleted row in loop.
so, If cola[i,1] == ''
, the i
has to again or next i
has to be -1.
What should I do?