|
75 | 75 |
|
76 | 76 |
|
77 | 77 | # ============================================================================= |
78 | | -# Data types, constants and type-related helpers |
| 78 | +# Data types |
79 | 79 | # ============================================================================= |
80 | | - |
81 | | -# ----------------------------------------------------------------------------- |
82 | | -# Data types (borrowed from NumPy) |
83 | | -# |
84 | | -# The order of these declarations are borrowed from the NumPy document: |
85 | | -# https://numpy.org/doc/stable/reference/arrays.scalars.html |
86 | | -# ----------------------------------------------------------------------------- |
87 | 80 | from .dpnp_iface_types import ( |
88 | 81 | bool, |
89 | 82 | bool_, |
|
94 | 87 | complexfloating, |
95 | 88 | csingle, |
96 | 89 | double, |
97 | | - dtype, |
98 | 90 | float16, |
99 | 91 | float32, |
100 | 92 | float64, |
|
125 | 117 | ulonglong, |
126 | 118 | ) |
127 | 119 |
|
| 120 | +# ============================================================================= |
| 121 | +# Routines |
| 122 | +# |
| 123 | +# The order of these declarations are borrowed from the NumPy document: |
| 124 | +# https://numpy.org/doc/stable/reference/routines.html |
| 125 | +# ============================================================================= |
| 126 | + |
128 | 127 | # ----------------------------------------------------------------------------- |
129 | | -# Constants (borrowed from NumPy) |
| 128 | +# Constants |
130 | 129 | # ----------------------------------------------------------------------------- |
131 | 130 | from .dpnp_iface_types import ( |
132 | 131 | e, |
|
137 | 136 | pi, |
138 | 137 | ) |
139 | 138 |
|
140 | | -# ----------------------------------------------------------------------------- |
141 | | -# Type-related helper functions |
142 | | -# ----------------------------------------------------------------------------- |
143 | | -from .dpnp_iface_types import ( |
144 | | - common_type, |
145 | | - finfo, |
146 | | - iinfo, |
147 | | - isdtype, |
148 | | - issubdtype, |
149 | | - is_type_supported, |
150 | | -) |
151 | | - |
152 | | -# ============================================================================= |
153 | | -# Routines |
154 | | -# |
155 | | -# The order of these declarations are borrowed from the NumPy document: |
156 | | -# https://numpy.org/doc/stable/reference/routines.html |
157 | | -# ============================================================================= |
158 | | - |
159 | 139 | # ----------------------------------------------------------------------------- |
160 | 140 | # Array creation routines |
161 | 141 | # ----------------------------------------------------------------------------- |
|
213 | 193 | atleast_3d, |
214 | 194 | broadcast_arrays, |
215 | 195 | broadcast_to, |
216 | | - can_cast, |
217 | 196 | column_stack, |
218 | 197 | concat, |
219 | 198 | concatenate, |
|
238 | 217 | require, |
239 | 218 | reshape, |
240 | 219 | resize, |
241 | | - result_type, |
242 | 220 | roll, |
243 | 221 | rollaxis, |
244 | 222 | rot90, |
|
275 | 253 | right_shift, |
276 | 254 | ) |
277 | 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 | + is_type_supported, |
| 266 | +) |
| 267 | +from .dpnp_iface_manipulation import can_cast, result_type |
| 268 | +from .dpnp_iface_types import dtype |
| 269 | + |
278 | 270 | # ----------------------------------------------------------------------------- |
279 | 271 | # Functional programming |
280 | 272 | # ----------------------------------------------------------------------------- |
|
597 | 589 | # Public API |
598 | 590 | # ============================================================================= |
599 | 591 |
|
600 | | -# Data types, constants and type-related helpers |
| 592 | +# Data types |
601 | 593 | __all__ = [ |
602 | 594 | "bool", |
603 | 595 | "bool_", |
|
608 | 600 | "complexfloating", |
609 | 601 | "csingle", |
610 | 602 | "double", |
611 | | - "dtype", |
612 | 603 | "float16", |
613 | 604 | "float32", |
614 | 605 | "float64", |
|
638 | 629 | "ushort", |
639 | 630 | "ulonglong", |
640 | 631 | ] |
| 632 | + |
| 633 | +# Constants |
641 | 634 | __all__ += [ |
642 | 635 | "e", |
643 | 636 | "euler_gamma", |
|
646 | 639 | "newaxis", |
647 | 640 | "pi", |
648 | 641 | ] |
649 | | -__all__ += [ |
650 | | - "common_type", |
651 | | - "finfo", |
652 | | - "iinfo", |
653 | | - "isdtype", |
654 | | - "issubdtype", |
655 | | - "is_type_supported", |
656 | | -] |
657 | 642 |
|
658 | 643 | # Array creation routines |
659 | 644 | __all__ += [ |
|
708 | 693 | "atleast_3d", |
709 | 694 | "broadcast_arrays", |
710 | 695 | "broadcast_to", |
711 | | - "can_cast", |
712 | 696 | "column_stack", |
713 | 697 | "concat", |
714 | 698 | "concatenate", |
|
733 | 717 | "require", |
734 | 718 | "reshape", |
735 | 719 | "resize", |
736 | | - "result_type", |
737 | 720 | "roll", |
738 | 721 | "rollaxis", |
739 | 722 | "rot90", |
|
768 | 751 | "right_shift", |
769 | 752 | ] |
770 | 753 |
|
| 754 | +# Data type routines |
| 755 | +__all__ += [ |
| 756 | + "can_cast", |
| 757 | + "common_type", |
| 758 | + "dtype", |
| 759 | + "finfo", |
| 760 | + "iinfo", |
| 761 | + "isdtype", |
| 762 | + "issubdtype", |
| 763 | + "is_type_supported", |
| 764 | + "result_type", |
| 765 | +] |
| 766 | + |
771 | 767 | # Functional programming |
772 | 768 | __all__ += [ |
773 | 769 | "apply_along_axis", |
|
0 commit comments