dtype() definition and example is added

pull/471/head
Rupa-Rd 2024-05-20 21:54:39 +05:30
rodzic 2e33a9b997
commit 92beeba6c2
1 zmienionych plików z 14 dodań i 0 usunięć

Wyświetl plik

@ -14,6 +14,17 @@ Numpy supports the following data types:
- `S` - string - `S` - string
- `U` - unicode string - `U` - unicode string
## dtype() Function
The `dtype()` function returns the type of the NumPy array object.
``` python
import numpy as np
arr = np.array([1, 2, 3, 4])
print(arr.dtype)
# Output: int64
```
## Example for integer type ## Example for integer type
## Example for float type ## Example for float type
@ -33,3 +44,6 @@ Numpy supports the following data types:
## Example for unicode string type ## Example for unicode string type
## Example for timedelta type ## Example for timedelta type
# Data Type Conversion