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

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/numpy-discussion

Reply via email to