z_as_int64 = numpy.int64(z)
It's that simple. Make sure you have a good reason, though - there are a few good reasons to do this, but most of the time, you can just use a regular int directly.
int
import numpy as npz = 3z = np.dtype('int64').type(z)print(type(z))
outputs:
<class 'numpy.int64'>
But i support Juliens question in his comment.