Hey, I have a faster solution.
import numpy as np

gt = np.array([
    [-1.0, 0.0, 0.0],
    [1.0, 0.0, 0.0],
    [0.0, 1.0, 0.0],
    [0.0, 0.0, 0.8],
    [1.0, 0.0, 0.0]
])

new_gt = np.zeros((gt.shape[0], 4), dtype=gt.dtype)
new_gt[:, 1:] = gt > 0
new_gt[:, 0] = gt[:, 0] == -1
print(new_gt)

Addition:
new_gt = new_gt[gt.sum(axis=1) != 0, :] will filter out [0., 0., 0.] in gt