from numpy import array
a = array([1,2,3])
a.dtype # dtype('int32')
a.dtype.kind # 'i', for 'integer'
s = array(['a','b','c'])
s.dtype # dtype('|S1')
s.dtype.kind # 'S' for 'string'
f = array([1., 2., 3.])
f.dtype # dtype('float64')
f.dtype.kind # 'f' for 'float'
Recent Posts
- Minimal Sphinx setup for autodocumenting Python modules
- Write Excel files with Python using xlwt
- Python script to package Latex projects for distribution
- RPy: statistics in R from Python
- Polar bar plot in Python
- Record screencasts, convert to Flash, and embed on your site
- Interactive subplots: make all x-axes move together
- Calculate sunrise and sunset with PyEphem
- Use Sphinx for documentation
- Insert content into TiddlyWikis with this Python script
| M | T | W | T | F | S | S |
|---|---|---|---|---|---|---|
| « Apr | ||||||
| 1 | 2 | 3 | 4 | 5 | ||
| 6 | 7 | 8 | 9 | 10 | 11 | 12 |
| 13 | 14 | 15 | 16 | 17 | 18 | 19 |
| 20 | 21 | 22 | 23 | 24 | 25 | 26 |
| 27 | 28 | 29 | ||||
0 Responses to “Check the type of array in Numpy”