Skip to content

Commit bfdd5db

Browse files
committed
Additional datatype longdouble is added
1 parent 5effa72 commit bfdd5db

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

contrib/numpy/datatypes.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,20 @@ The `timedelta64()` used to find the difference between the `datetime64()`. The
216216
# 366 days
217217
# timedelta64[D]
218218
```
219+
## Additional Data Type (`longdouble`)
220+
`longdouble` is a data type that provides higher precision than the standard double-precision floating-point (`float64`) type.
221+
222+
``` python
223+
import numpy as np
224+
225+
arr = np.longdouble([1.222222, 4.44, 45.55])
226+
227+
print(arr, arr.dtype)
228+
229+
# Output:
230+
# [1.222222 4.44 45.55] float128
231+
```
232+
219233
# Data Type Conversion
220234
`astype()` function is used to the NumPy object from one type to another type.
221235

0 commit comments

Comments
 (0)