|
Size: 665
Comment:
|
← Revision 3 as of 2008-04-21 13:31:06 ⇥
Size: 627
Comment:
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 16: | Line 16: |
| Numerischer Typ Speicherbelegung | ||'''Numerischer Typ'''||||'''Speicherbelegung'''|| |
| Line 18: | Line 18: |
| float32 4 byte(s) | ||float32||||4 byte(s)|| |
| Line 20: | Line 20: |
| float64 8 byte(s) | ||float64||||8 byte(s)|| |
| Line 22: | Line 22: |
| float96 12 byte(s) | ||float96||||12 byte(s)|| |
| Line 24: | Line 24: |
| complex64 8 byte(s) | ||complex64||||8 byte(s)|| |
| Line 26: | Line 26: |
| complex128 16 byte(s) | ||complex128||||16 byte(s)|| |
| Line 28: | Line 28: |
| complex192 24 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) |
|
