The `extend` converts arrays to lists. A potentially faster approach would be
```
indptr.append(b.indptr[:-1] + last_indptr)
```
and after the loop do
```
indptr.append([last_indptr])
indptr = np.concatenate(indptr)
```