Allow Python long int where int is expected.

Also allow numpy.integer, in case things like np.int64(...) are used.
When (int, float) were expected, allow numpy.number instead of
numpy.integer, so things like numpy.float32(...) also work.