As Jaime notes, this is incorrect if the sparsity patterns differ. For this PR, you should probably just raise NotImplementedError() if `n` is not a scalar.

Or, check how binary ops (e.g. plus) are implemented in sparsetools/csr.h, csr.i, csc.h, csc.i, bsr.h, bsr.i and do the same for the power operation.