From: Sebastian H. <ha...@ms...> - 2006-08-18 18:26:16
|
Hi, array dtype descriptors have an attribute itemsize that gives the total number of bytes required for an item of that dtype. Scalar types, like numy.int32, also have that attribute, but it returns "something else" - don't know what: >>> a.dtype.itemsize 4 >>> a.dtype.name 'float32' >>> N.int32.itemsize <attribute 'itemsize' of 'genericscalar' objects> Furthermore there are *lot's* of more attributes to a scalar dtype, e.g. >>> N.int32.data <attribute 'data' of 'genericscalar' objects> >>> N.int32.argmax() Traceback (most recent call last): File "<input>", line 1, in ? TypeError: descriptor 'argmax' of 'genericscalar' object needs an argument Are those useful ? Thanks, Sebastian Haase |