Imagine a table with known dimensions. The first column holds numbers and the rest of the rows are 0. I would like the fill the rows based on the value in the first column by subtracting 1 and stop in the column where the value is 0. I would like this to be as efficient as possible

The code I have now uses ndarrays and a loop :

```
test = np.zeros([3,360])
test[:,0] = [1,180,360]
for j in range(1,360):    
    test[:,j] = test[:,j-1]-1
test[np.where(test<0)] = 0

```

Is there a more efficient/pythonic way ? E.g. avoiding the for-loop ?