David, >I'm concluding that the .astype(np.uint8) is applied after the array is constructed, instead of during the process.
That is how python works in general. astype is a method of an array, so randint needs to return the array before there is something with an astype method to call. A dtype keyword arg to randint, on the otherhand, would influence the construction of the array. Elliot
_______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org https://mail.scipy.org/mailman/listinfo/numpy-discussion