Could this line be written as:
```python
data = data[:, :, np.newaxis, :]
```