diff --git a/contrib/numpy/datatypes.md b/contrib/numpy/datatypes.md index 616d6c3..6107d8d 100644 --- a/contrib/numpy/datatypes.md +++ b/contrib/numpy/datatypes.md @@ -168,7 +168,18 @@ The `datetime64()` is used to define the date, month and year. ## Example for string type ## Example for object type +``` python + import numpy as np + arr = np.object_([1, 2, 3, 4]) + + print(arr) + print(arr.dtype) + + # Output: + # [1, 2, 3, 4] + # object +``` ## Example for unicode string type ## Example for timedelta type