|
68 | 68 |
|
69 | 69 | from .dpnp_array import dpnp_array as ndarray |
70 | 70 | from .dpnp_array_api_info import __array_namespace_info__ |
71 | | -from .dpnp_flatiter import flatiter as flatiter |
72 | | -from .dpnp_iface_types import * |
73 | | -from .dpnp_iface_utils import * |
74 | | -from .dpnp_iface_utils import __all__ as _ifaceutils__all__ |
75 | 71 | from ._version import get_versions |
76 | 72 | from . import exceptions as exceptions |
77 | 73 | from . import fft as fft |
78 | 74 | from . import linalg as linalg |
79 | 75 | from . import random as random |
80 | 76 | from . import scipy as scipy |
81 | 77 |
|
| 78 | +# ============================================================================= |
| 79 | +# Data types |
| 80 | +# ============================================================================= |
| 81 | +from .dpnp_iface_types import ( |
| 82 | + bool, |
| 83 | + bool_, |
| 84 | + byte, |
| 85 | + cdouble, |
| 86 | + complex128, |
| 87 | + complex64, |
| 88 | + complexfloating, |
| 89 | + csingle, |
| 90 | + double, |
| 91 | + float16, |
| 92 | + float32, |
| 93 | + float64, |
| 94 | + floating, |
| 95 | + inexact, |
| 96 | + int_, |
| 97 | + int8, |
| 98 | + int16, |
| 99 | + int32, |
| 100 | + int64, |
| 101 | + integer, |
| 102 | + intc, |
| 103 | + intp, |
| 104 | + longlong, |
| 105 | + number, |
| 106 | + short, |
| 107 | + signedinteger, |
| 108 | + single, |
| 109 | + ubyte, |
| 110 | + uint8, |
| 111 | + uint16, |
| 112 | + uint32, |
| 113 | + uint64, |
| 114 | + uintc, |
| 115 | + uintp, |
| 116 | + unsignedinteger, |
| 117 | + ushort, |
| 118 | + ulonglong, |
| 119 | +) |
82 | 120 |
|
83 | 121 | # ============================================================================= |
84 | 122 | # Routines |
|
87 | 125 | # https://numpy.org/doc/stable/reference/routines.html |
88 | 126 | # ============================================================================= |
89 | 127 |
|
| 128 | +# ----------------------------------------------------------------------------- |
| 129 | +# Constants |
| 130 | +# ----------------------------------------------------------------------------- |
| 131 | +from .dpnp_iface_types import ( |
| 132 | + e, |
| 133 | + euler_gamma, |
| 134 | + inf, |
| 135 | + nan, |
| 136 | + newaxis, |
| 137 | + pi, |
| 138 | +) |
| 139 | + |
90 | 140 | # ----------------------------------------------------------------------------- |
91 | 141 | # Array creation routines |
92 | 142 | # ----------------------------------------------------------------------------- |
|
144 | 194 | atleast_3d, |
145 | 195 | broadcast_arrays, |
146 | 196 | broadcast_to, |
147 | | - can_cast, |
148 | 197 | column_stack, |
149 | 198 | concat, |
150 | 199 | concatenate, |
|
169 | 218 | require, |
170 | 219 | reshape, |
171 | 220 | resize, |
172 | | - result_type, |
173 | 221 | roll, |
174 | 222 | rollaxis, |
175 | 223 | rot90, |
|
206 | 254 | right_shift, |
207 | 255 | ) |
208 | 256 |
|
| 257 | +# ----------------------------------------------------------------------------- |
| 258 | +# Data type routines |
| 259 | +# ----------------------------------------------------------------------------- |
| 260 | +from .dpnp_iface_types import ( |
| 261 | + common_type, |
| 262 | + finfo, |
| 263 | + iinfo, |
| 264 | + isdtype, |
| 265 | + issubdtype, |
| 266 | +) |
| 267 | +from .dpnp_iface_manipulation import can_cast, result_type |
| 268 | +from .dpnp_iface_types import dtype |
| 269 | + |
209 | 270 | # ----------------------------------------------------------------------------- |
210 | 271 | # Functional programming |
211 | 272 | # ----------------------------------------------------------------------------- |
|
226 | 287 | diagonal, |
227 | 288 | extract, |
228 | 289 | fill_diagonal, |
229 | | - flatnonzero, |
230 | 290 | indices, |
231 | 291 | iterable, |
232 | 292 | ix_, |
|
247 | 307 | triu_indices_from, |
248 | 308 | unravel_index, |
249 | 309 | ) |
| 310 | +from .dpnp_flatiter import flatiter |
250 | 311 |
|
251 | 312 | # ----------------------------------------------------------------------------- |
252 | 313 | # Linear algebra |
|
423 | 484 | # Miscellaneous routines |
424 | 485 | # ----------------------------------------------------------------------------- |
425 | 486 | from .dpnp_iface_manipulation import broadcast_shapes |
| 487 | +from .dpnp_iface_utils import byte_bounds |
426 | 488 | from .dpnp_iface import get_include |
427 | 489 |
|
428 | 490 | # ----------------------------------------------------------------------------- |
|
440 | 502 | # Sorting, searching, and counting |
441 | 503 | # ----------------------------------------------------------------------------- |
442 | 504 | from .dpnp_iface_counting import count_nonzero |
| 505 | +from .dpnp_iface_indexing import flatnonzero |
443 | 506 | from .dpnp_iface_nanfunctions import nanargmax, nanargmin |
444 | 507 | from .dpnp_iface_searching import ( |
445 | 508 | argmax, |
|
529 | 592 |
|
530 | 593 | __all__ = ["__array_namespace_info__", "ndarray"] |
531 | 594 |
|
| 595 | +# Data types |
| 596 | +__all__ = [ |
| 597 | + "bool", |
| 598 | + "bool_", |
| 599 | + "byte", |
| 600 | + "cdouble", |
| 601 | + "complex128", |
| 602 | + "complex64", |
| 603 | + "complexfloating", |
| 604 | + "csingle", |
| 605 | + "double", |
| 606 | + "float16", |
| 607 | + "float32", |
| 608 | + "float64", |
| 609 | + "floating", |
| 610 | + "inexact", |
| 611 | + "int_", |
| 612 | + "int8", |
| 613 | + "int16", |
| 614 | + "int32", |
| 615 | + "int64", |
| 616 | + "integer", |
| 617 | + "intc", |
| 618 | + "intp", |
| 619 | + "longlong", |
| 620 | + "number", |
| 621 | + "short", |
| 622 | + "signedinteger", |
| 623 | + "single", |
| 624 | + "ubyte", |
| 625 | + "uint8", |
| 626 | + "uint16", |
| 627 | + "uint32", |
| 628 | + "uint64", |
| 629 | + "uintc", |
| 630 | + "uintp", |
| 631 | + "unsignedinteger", |
| 632 | + "ushort", |
| 633 | + "ulonglong", |
| 634 | +] |
| 635 | + |
| 636 | +# Constants |
| 637 | +__all__ += [ |
| 638 | + "e", |
| 639 | + "euler_gamma", |
| 640 | + "inf", |
| 641 | + "nan", |
| 642 | + "newaxis", |
| 643 | + "pi", |
| 644 | +] |
| 645 | + |
532 | 646 | # Array creation routines |
533 | 647 | __all__ += [ |
534 | 648 | "arange", |
|
582 | 696 | "atleast_3d", |
583 | 697 | "broadcast_arrays", |
584 | 698 | "broadcast_to", |
585 | | - "can_cast", |
586 | 699 | "column_stack", |
587 | 700 | "concat", |
588 | 701 | "concatenate", |
|
607 | 720 | "require", |
608 | 721 | "reshape", |
609 | 722 | "resize", |
610 | | - "result_type", |
611 | 723 | "roll", |
612 | 724 | "rollaxis", |
613 | 725 | "rot90", |
|
642 | 754 | "right_shift", |
643 | 755 | ] |
644 | 756 |
|
| 757 | +# Data type routines |
| 758 | +__all__ += [ |
| 759 | + "can_cast", |
| 760 | + "common_type", |
| 761 | + "dtype", |
| 762 | + "finfo", |
| 763 | + "iinfo", |
| 764 | + "isdtype", |
| 765 | + "issubdtype", |
| 766 | + "result_type", |
| 767 | +] |
| 768 | + |
645 | 769 | # Functional programming |
646 | 770 | __all__ += [ |
647 | 771 | "apply_along_axis", |
|
659 | 783 | "extract", |
660 | 784 | "fill_diagonal", |
661 | 785 | "flatiter", |
662 | | - "flatnonzero", |
663 | 786 | "indices", |
664 | 787 | "iterable", |
665 | 788 | "ix_", |
|
850 | 973 | # Miscellaneous routines |
851 | 974 | __all__ += [ |
852 | 975 | "broadcast_shapes", |
| 976 | + "byte_bounds", |
853 | 977 | "get_include", |
854 | 978 | ] |
855 | 979 |
|
|
869 | 993 | "argwhere", |
870 | 994 | "argsort", |
871 | 995 | "count_nonzero", |
| 996 | + "flatnonzero", |
872 | 997 | "partition", |
873 | 998 | "searchsorted", |
874 | 999 | "sort", |
|
933 | 1058 | "synchronize_array_data", |
934 | 1059 | ] |
935 | 1060 |
|
936 | | -__all__ += _ifaceutils__all__ |
937 | | - |
938 | 1061 | # add submodules |
939 | 1062 | __all__ += ["exceptions", "fft", "linalg", "random", "scipy"] |
940 | 1063 |
|
|
0 commit comments