I don't think you need to fix it, but I don't really understand why:
```
np.ones(shape) * value
```
is preferable to:
```
np.repeat(value, shape)
```