From de8528b281db1e21ee701d5bb796557325fde6a7 Mon Sep 17 00:00:00 2001 From: Nathan Goldbaum Date: Fri, 19 Jul 2024 13:21:09 -0600 Subject: [PATCH] DOC: fix ctypes example --- numpy/ctypeslib.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/numpy/ctypeslib.py b/numpy/ctypeslib.py index 5ab89ba7dd15..ea94ad30852e 100644 --- a/numpy/ctypeslib.py +++ b/numpy/ctypeslib.py @@ -503,17 +503,17 @@ def as_ctypes_type(dtype): -------- Converting a simple dtype: - >>> dt = np.dtype('i4') + >>> dt = np.dtype('int8') >>> ctype = np.ctypeslib.as_ctypes_type(dt) >>> ctype - + Converting a structured dtype: >>> dt = np.dtype([('x', 'i4'), ('y', 'f4')]) >>> ctype = np.ctypeslib.as_ctypes_type(dt) >>> ctype - + """ return _ctype_from_dtype(_dtype(dtype))