Needs to be changed to `isintlike(p)`, and to the top add `from scipy.sparse.sputils import isshape, isintlike`.