|
66 | 66 | from .dpnp_array import dpnp_array as ndarray |
67 | 67 | from .dpnp_array_api_info import __array_namespace_info__ |
68 | 68 | from .dpnp_flatiter import flatiter as flatiter |
69 | | -from .dpnp_iface_types import * |
70 | 69 | from .dpnp_iface_utils import * |
71 | 70 | from .dpnp_iface_utils import __all__ as _ifaceutils__all__ |
72 | 71 | from ._version import get_versions |
|
77 | 76 | from . import scipy as scipy |
78 | 77 |
|
79 | 78 |
|
| 79 | +# ============================================================================= |
| 80 | +# Data types, constants and type-related helpers |
| 81 | +# ============================================================================= |
| 82 | + |
| 83 | +# ----------------------------------------------------------------------------- |
| 84 | +# Data types (borrowed from NumPy) |
| 85 | +# |
| 86 | +# The order of these declarations are borrowed from the NumPy document: |
| 87 | +# https://numpy.org/doc/stable/reference/arrays.scalars.html |
| 88 | +# ----------------------------------------------------------------------------- |
| 89 | +from .dpnp_iface_types import ( |
| 90 | + bool, |
| 91 | + bool_, |
| 92 | + byte, |
| 93 | + cdouble, |
| 94 | + complex128, |
| 95 | + complex64, |
| 96 | + complexfloating, |
| 97 | + csingle, |
| 98 | + double, |
| 99 | + dtype, |
| 100 | + float16, |
| 101 | + float32, |
| 102 | + float64, |
| 103 | + floating, |
| 104 | + inexact, |
| 105 | + int_, |
| 106 | + int8, |
| 107 | + int16, |
| 108 | + int32, |
| 109 | + int64, |
| 110 | + integer, |
| 111 | + intc, |
| 112 | + intp, |
| 113 | + longlong, |
| 114 | + number, |
| 115 | + short, |
| 116 | + signedinteger, |
| 117 | + single, |
| 118 | + ubyte, |
| 119 | + uint8, |
| 120 | + uint16, |
| 121 | + uint32, |
| 122 | + uint64, |
| 123 | + uintc, |
| 124 | + uintp, |
| 125 | + unsignedinteger, |
| 126 | + ushort, |
| 127 | + ulonglong, |
| 128 | +) |
| 129 | + |
| 130 | +# ----------------------------------------------------------------------------- |
| 131 | +# Constants (borrowed from NumPy) |
| 132 | +# ----------------------------------------------------------------------------- |
| 133 | +from .dpnp_iface_types import ( |
| 134 | + e, |
| 135 | + euler_gamma, |
| 136 | + inf, |
| 137 | + nan, |
| 138 | + newaxis, |
| 139 | + pi, |
| 140 | +) |
| 141 | + |
| 142 | +# ----------------------------------------------------------------------------- |
| 143 | +# Type-related helper functions |
| 144 | +# ----------------------------------------------------------------------------- |
| 145 | +from .dpnp_iface_types import ( |
| 146 | + common_type, |
| 147 | + finfo, |
| 148 | + iinfo, |
| 149 | + isdtype, |
| 150 | + issubdtype, |
| 151 | + is_type_supported, |
| 152 | +) |
| 153 | + |
80 | 154 | # ============================================================================= |
81 | 155 | # Routines |
82 | 156 | # |
|
0 commit comments