BUG: fix off-by-one in dimensionality error message

The maximum allowed is really 32, not 31.
BUG: fix off-by-one in dimension error message

The maximum allowed is really NP_MAX_INT, not NP_MAX_INT-1.