The following is a valid set of arrays for a CSR matrix encoding the row vector `[[3, 3]]`:

```
data = [1, 2, 3]
indices = [0, 0, 1]
indptr = [0, 3]
```

There is no guarantee that you will not have more than one entry for a given position in your sparse matrix, as happens above. The convention is that, when this happens, the value stored at that location is the sum of all values found for the location. You need to do that adding together before raising to the power `n`. If you applied your method to the above example, with `n = 2`, instead of getting `[[9, 9]]`, you would get `[[5, 9]]`, which is wrong.