Reconcile C API with docs

This fixes #5286 and results from discussion on that issue.
The `arr_size` should be a `npy_intp` also.