⇤ ← Revision 1 as of 2008-04-21 13:21:33
Size: 594
Comment:
|
Size: 665
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 16: | Line 16: |
Numerischer Typ Speicherbelegung float32 4 byte(s) float64 8 byte(s) float96 12 byte(s) complex64 8 byte(s) complex128 16 byte(s) complex192 24 byte(s) |
Numerischer Typ Speicherbelegung float32 4 byte(s) float64 8 byte(s) float96 12 byte(s) complex64 8 byte(s) complex128 16 byte(s) complex192 24 byte(s) |
1 from scipy import *
2 Float_str=['float32','float64','float96','complex64','complex128','complex192']
3 Float=array([float32,float64,float96,complex64,complex128,complex192])
4 print 'Numerischer Typ\tSpeicherbelegung'
5 for k in range(Float.size):
6 f=Float_str[k]
7 a=Float[k](1)
8 Speicher=a.nbytes
9 print f,'\t',Speicher,'byte(s)'
Ausgabe:
Numerischer Typ Speicherbelegung
float32 4 byte(s)
float64 8 byte(s)
float96 12 byte(s)
complex64 8 byte(s)
complex128 16 byte(s)
complex192 24 byte(s)