Python: confusion between types and dtypes
问题 Suppose I enter: a = uint8(200) a*2 Then the result is 400, and it is recast to be of type uint16. However: a = array([200],dtype=uint8) a*2 and the result is array([144], dtype=uint8) The multiplication has been performed modulo 256, to ensure that the result stays in one byte. I'm confused about "types" and "dtypes" and where one is used in preference to another. And as you see, the type may make a significant difference in the output. Can I, for example, create a single number of dtype