From c0c18518b0afaba583153490169822072a5f1d29 Mon Sep 17 00:00:00 2001 From: Nathan Goldbaum Date: Wed, 24 Jan 2024 17:31:23 -0700 Subject: [PATCH] DOC: replace autsummary for numpy.dtypes with enumerated list [skip azp] [skip actions] [skip cirrus] --- doc/source/reference/routines.dtypes.rst | 68 ++++++++++++++++++++++-- numpy/dtypes.py | 35 ------------ 2 files changed, 64 insertions(+), 39 deletions(-) diff --git a/doc/source/reference/routines.dtypes.rst b/doc/source/reference/routines.dtypes.rst index 5e95c4b83a17..49b238a727cf 100644 --- a/doc/source/reference/routines.dtypes.rst +++ b/doc/source/reference/routines.dtypes.rst @@ -3,9 +3,69 @@ Data type classes ================= -.. currentmodule:: numpy +.. automodule:: numpy.dtypes + :no-members: -.. autosummary:: - :toctree: generated/ +Boolean +------- - dtypes +.. attribute:: BoolDType + +Bit-sized integers +------------------ + +.. attribute:: Int8DType + UInt8DType + Int16DType + UInt16DType + Int32DType + UInt32DType + Int64DType + UInt64DType + +C-named integers (may be aliases) +--------------------------------- + +.. attribute:: ByteDType + UByteDType + ShortDType + UShortDType + IntDType + UIntDType + LongDType + ULongDType + LongLongDType + ULongLongDType + +Floating point +-------------- + +.. attribute:: Float16DType + Float32DType + Float64DType + LongDoubleDType + +Complex +------- + +.. attribute:: Complex64DType + Complex128DType + CLongDoubleDType + +Strings and Bytestrings +----------------------- + +.. attribute:: StrDType + BytesDType + +Times +----- + +.. attribute:: DateTime64DType + TimeDelta64DType + +Others +------ + +.. attribute:: ObjectDType + VoidDType diff --git a/numpy/dtypes.py b/numpy/dtypes.py index 943dde4ad000..e16315311293 100644 --- a/numpy/dtypes.py +++ b/numpy/dtypes.py @@ -20,41 +20,6 @@ also be instantiated or used directly. Direct use of these classes is not typical, since their scalar counterparts (e.g. ``np.float64``) or strings like ``"float64"`` can be used. - -.. list-table:: - :header-rows: 1 - - * - Group - - DType class - - * - Boolean - - ``BoolDType`` - - * - Bit-sized integers - - ``Int8DType``, ``UInt8DType``, ``Int16DType``, ``UInt16DType``, - ``Int32DType``, ``UInt32DType``, ``Int64DType``, ``UInt64DType`` - - * - C-named integers (may be aliases) - - ``ByteDType``, ``UByteDType``, ``ShortDType``, ``UShortDType``, - ``IntDType``, ``UIntDType``, ``LongDType``, ``ULongDType``, - ``LongLongDType``, ``ULongLongDType`` - - * - Floating point - - ``Float16DType``, ``Float32DType``, ``Float64DType``, - ``LongDoubleDType`` - - * - Complex - - ``Complex64DType``, ``Complex128DType``, ``CLongDoubleDType`` - - * - Strings and Bytestrings - - ``StrDType``, ``BytesDType`` - - * - Times - - ``DateTime64DType``, ``TimeDelta64DType`` - - * - Others - - ``ObjectDType``, ``VoidDType`` - """ __all__ = []