signals = signals.cuda()
for i_signal in range(positions.size(0)):
n_points = positions[i_signal].size(0)
for i_point in range(n_points):
if weights[i_signal, i_point] == 0:
break
weight = weights[i_signal, i_point]
After Change
signals = np.zeros((positions.shape[0], M, N, O))
for i_signal in range(positions.shape[0]):
n_points = positions[i_signal].shape[0]
for i_point in range(n_points):
if weights[i_signal, i_point] == 0:
break
weight = weights[i_signal, i_point]