Data Type Objects
Data Type Objects
dtype )
o numpy.dtype
o numpy.dtype.type
o numpy.dtype.kind
o numpy.dtype.char
o numpy.dtype.num
o numpy.dtype.str
o numpy.dtype.name
o numpy.dtype.itemsize
o numpy.dtype.byteorder
o numpy.dtype.fields
o numpy.dtype.names
o numpy.dtype.subdtype
o numpy.dtype.shape
o numpy.dtype.hasobject
o numpy.dtype.flags
o numpy.dtype.isbuiltin
o numpy.dtype.isnative
o numpy.dtype.descr
o numpy.dtype.alignment
o numpy.dtype.base
o numpy.dtype.metadata
o numpy.dtype.newbyteorder
o numpy.dtype.__reduce__
o numpy.dtype.__setstate__
axis 1 = no of columns
MANIPULATING ARRAYS:
Both the numpy.reshape() and numpy.resize() methods are used to change
the size of a NumPy array.
The difference:
reshape() does not changes the original array but only returns the changed
array, whereas the resize() method returns nothing and directly changes the
original array.
NumPy array attributes
1. ndim
2. itemsize
3. nbytes ## itemsize * size
4. size
5. resize
6. T
7. real
8. imag
9. dtype
10. flat
11. shape
Converting arrays
1. tolist()
2. astype()
CREATING ARRAY VIEWS AND COPIES:
copy() : returns a copy of an array