8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 472b938 + de8528b commit 495fe43Copy full SHA for 495fe43
numpy/ctypeslib.py
@@ -503,17 +503,17 @@ def as_ctypes_type(dtype):
503
--------
504
Converting a simple dtype:
505
506
- >>> dt = np.dtype('i4')
+ >>> dt = np.dtype('int8')
507
>>> ctype = np.ctypeslib.as_ctypes_type(dt)
508
>>> ctype
509
- <class 'ctypes.c_int32'>
+ <class 'ctypes.c_byte'>
510
511
Converting a structured dtype:
512
513
>>> dt = np.dtype([('x', 'i4'), ('y', 'f4')])
514
515
516
- <class 'ctypes.Structure'>
+ <class 'struct'>
517
518
"""
519
return _ctype_from_dtype(_dtype(dtype))
0 commit comments