Skip to content

Commit

Permalink
DOC: replace autsummary for numpy.dtypes with enumerated list
Browse files Browse the repository at this point in the history
[skip azp] [skip actions] [skip cirrus]
  • Loading branch information
ngoldbaum committed Jan 25, 2024
1 parent e999062 commit c0c1851
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 39 deletions.
68 changes: 64 additions & 4 deletions doc/source/reference/routines.dtypes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
35 changes: 0 additions & 35 deletions numpy/dtypes.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__ = []
Expand Down

0 comments on commit c0c1851

Please sign in to comment.