[Numpy-discussion] array of random numbers fails to construct
Permafacture at gmail.com
Mon Dec 7 18:03:10 EST 2015
>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.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the NumPy-Discussion