|
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 | | -from .dpnp_iface_utils import * |
71 | | -from .dpnp_iface_utils import __all__ as _ifaceutils__all__ |
72 | 69 | from ._version import get_versions |
73 | 70 | from . import exceptions as exceptions |
74 | 71 | from . import fft as fft |
|
77 | 74 | from . import scipy as scipy |
78 | 75 |
|
79 | 76 |
|
| 77 | +# ============================================================================= |
| 78 | +# Data types |
| 79 | +# ============================================================================= |
| 80 | +from .dpnp_iface_types import ( |
| 81 | + bool, |
| 82 | + bool_, |
| 83 | + byte, |
| 84 | + cdouble, |
| 85 | + complex128, |
| 86 | + complex64, |
| 87 | + complexfloating, |
| 88 | + csingle, |
| 89 | + double, |
| 90 | + float16, |
| 91 | + float32, |
| 92 | + float64, |
| 93 | + floating, |
| 94 | + inexact, |
| 95 | + int_, |
| 96 | + int8, |
| 97 | + int16, |
| 98 | + int32, |
| 99 | + int64, |
| 100 | + integer, |
| 101 | + intc, |
| 102 | + intp, |
| 103 | + longlong, |
| 104 | + number, |
| 105 | + short, |
| 106 | + signedinteger, |
| 107 | + single, |
| 108 | + ubyte, |
| 109 | + uint8, |
| 110 | + uint16, |
| 111 | + uint32, |
| 112 | + uint64, |
| 113 | + uintc, |
| 114 | + uintp, |
| 115 | + unsignedinteger, |
| 116 | + ushort, |
| 117 | + ulonglong, |
| 118 | +) |
| 119 | + |
80 | 120 | # ============================================================================= |
81 | 121 | # Routines |
82 | 122 | # |
83 | 123 | # The order of these declarations are borrowed from the NumPy document: |
84 | 124 | # https://numpy.org/doc/stable/reference/routines.html |
85 | 125 | # ============================================================================= |
86 | 126 |
|
| 127 | +# ----------------------------------------------------------------------------- |
| 128 | +# Constants |
| 129 | +# ----------------------------------------------------------------------------- |
| 130 | +from .dpnp_iface_types import ( |
| 131 | + e, |
| 132 | + euler_gamma, |
| 133 | + inf, |
| 134 | + nan, |
| 135 | + newaxis, |
| 136 | + pi, |
| 137 | +) |
| 138 | + |
87 | 139 | # ----------------------------------------------------------------------------- |
88 | 140 | # Array creation routines |
89 | 141 | # ----------------------------------------------------------------------------- |
|
141 | 193 | atleast_3d, |
142 | 194 | broadcast_arrays, |
143 | 195 | broadcast_to, |
144 | | - can_cast, |
145 | 196 | column_stack, |
146 | 197 | concat, |
147 | 198 | concatenate, |
|
166 | 217 | require, |
167 | 218 | reshape, |
168 | 219 | resize, |
169 | | - result_type, |
170 | 220 | roll, |
171 | 221 | rollaxis, |
172 | 222 | rot90, |
|
203 | 253 | right_shift, |
204 | 254 | ) |
205 | 255 |
|
| 256 | +# ----------------------------------------------------------------------------- |
| 257 | +# Data type routines |
| 258 | +# ----------------------------------------------------------------------------- |
| 259 | +from .dpnp_iface_types import ( |
| 260 | + common_type, |
| 261 | + finfo, |
| 262 | + iinfo, |
| 263 | + isdtype, |
| 264 | + issubdtype, |
| 265 | +) |
| 266 | +from .dpnp_iface_manipulation import can_cast, result_type |
| 267 | +from .dpnp_iface_types import dtype |
| 268 | + |
206 | 269 | # ----------------------------------------------------------------------------- |
207 | 270 | # Functional programming |
208 | 271 | # ----------------------------------------------------------------------------- |
|
420 | 483 | # Miscellaneous routines |
421 | 484 | # ----------------------------------------------------------------------------- |
422 | 485 | from .dpnp_iface_manipulation import broadcast_shapes |
| 486 | +from .dpnp_iface_utils import byte_bounds |
423 | 487 | from .dpnp_iface import get_include |
424 | 488 |
|
425 | 489 | # ----------------------------------------------------------------------------- |
|
524 | 588 | # Public API |
525 | 589 | # ============================================================================= |
526 | 590 |
|
527 | | -# Array creation routines |
| 591 | +# Data types |
528 | 592 | __all__ = [ |
| 593 | + "bool", |
| 594 | + "bool_", |
| 595 | + "byte", |
| 596 | + "cdouble", |
| 597 | + "complex128", |
| 598 | + "complex64", |
| 599 | + "complexfloating", |
| 600 | + "csingle", |
| 601 | + "double", |
| 602 | + "float16", |
| 603 | + "float32", |
| 604 | + "float64", |
| 605 | + "floating", |
| 606 | + "inexact", |
| 607 | + "int_", |
| 608 | + "int8", |
| 609 | + "int16", |
| 610 | + "int32", |
| 611 | + "int64", |
| 612 | + "integer", |
| 613 | + "intc", |
| 614 | + "intp", |
| 615 | + "longlong", |
| 616 | + "number", |
| 617 | + "short", |
| 618 | + "signedinteger", |
| 619 | + "single", |
| 620 | + "ubyte", |
| 621 | + "uint8", |
| 622 | + "uint16", |
| 623 | + "uint32", |
| 624 | + "uint64", |
| 625 | + "uintc", |
| 626 | + "uintp", |
| 627 | + "unsignedinteger", |
| 628 | + "ushort", |
| 629 | + "ulonglong", |
| 630 | +] |
| 631 | + |
| 632 | +# Constants |
| 633 | +__all__ += [ |
| 634 | + "e", |
| 635 | + "euler_gamma", |
| 636 | + "inf", |
| 637 | + "nan", |
| 638 | + "newaxis", |
| 639 | + "pi", |
| 640 | +] |
| 641 | + |
| 642 | +# Array creation routines |
| 643 | +__all__ += [ |
529 | 644 | "arange", |
530 | 645 | "array", |
531 | 646 | "asanyarray", |
|
577 | 692 | "atleast_3d", |
578 | 693 | "broadcast_arrays", |
579 | 694 | "broadcast_to", |
580 | | - "can_cast", |
581 | 695 | "column_stack", |
582 | 696 | "concat", |
583 | 697 | "concatenate", |
|
602 | 716 | "require", |
603 | 717 | "reshape", |
604 | 718 | "resize", |
605 | | - "result_type", |
606 | 719 | "roll", |
607 | 720 | "rollaxis", |
608 | 721 | "rot90", |
|
637 | 750 | "right_shift", |
638 | 751 | ] |
639 | 752 |
|
| 753 | +# Data type routines |
| 754 | +__all__ += [ |
| 755 | + "can_cast", |
| 756 | + "common_type", |
| 757 | + "dtype", |
| 758 | + "finfo", |
| 759 | + "iinfo", |
| 760 | + "isdtype", |
| 761 | + "issubdtype", |
| 762 | + "result_type", |
| 763 | +] |
| 764 | + |
640 | 765 | # Functional programming |
641 | 766 | __all__ += [ |
642 | 767 | "apply_along_axis", |
|
844 | 969 | # Miscellaneous routines |
845 | 970 | __all__ += [ |
846 | 971 | "broadcast_shapes", |
| 972 | + "byte_bounds", |
847 | 973 | "get_include", |
848 | 974 | ] |
849 | 975 |
|
|
927 | 1053 | "synchronize_array_data", |
928 | 1054 | ] |
929 | 1055 |
|
930 | | -__all__ += _ifaceutils__all__ |
931 | | - |
932 | 1056 | # add submodules |
933 | 1057 | __all__ += ["exceptions", "fft", "linalg", "random", "scipy"] |
934 | 1058 |
|
|
0 commit comments