From cf4a924c0eedfa9672377d967c6ea93efd25b146 Mon Sep 17 00:00:00 2001 From: Rupa-Rd Date: Mon, 20 May 2024 22:56:17 +0530 Subject: [PATCH] Example for String type is added --- contrib/numpy/datatypes.md | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/contrib/numpy/datatypes.md b/contrib/numpy/datatypes.md index 6107d8d..d365623 100644 --- a/contrib/numpy/datatypes.md +++ b/contrib/numpy/datatypes.md @@ -166,6 +166,15 @@ The `datetime64()` is used to define the date, month and year. ``` ## Example for string type +``` python + import numpy as np + + arr = np.str_("roopa") + + print(arr.dtype) + + # Output: