Skip to content

Commit afaf007

Browse files
Apply remarks
1 parent 21f9837 commit afaf007

File tree

1 file changed

+39
-43
lines changed

1 file changed

+39
-43
lines changed

dpnp/__init__.py

Lines changed: 39 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -75,15 +75,8 @@
7575

7676

7777
# =============================================================================
78-
# Data types, constants and type-related helpers
78+
# Data types
7979
# =============================================================================
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-
# -----------------------------------------------------------------------------
8780
from .dpnp_iface_types import (
8881
bool,
8982
bool_,
@@ -94,7 +87,6 @@
9487
complexfloating,
9588
csingle,
9689
double,
97-
dtype,
9890
float16,
9991
float32,
10092
float64,
@@ -125,8 +117,15 @@
125117
ulonglong,
126118
)
127119

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+
128127
# -----------------------------------------------------------------------------
129-
# Constants (borrowed from NumPy)
128+
# Constants
130129
# -----------------------------------------------------------------------------
131130
from .dpnp_iface_types import (
132131
e,
@@ -137,25 +136,6 @@
137136
pi,
138137
)
139138

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-
159139
# -----------------------------------------------------------------------------
160140
# Array creation routines
161141
# -----------------------------------------------------------------------------
@@ -213,7 +193,6 @@
213193
atleast_3d,
214194
broadcast_arrays,
215195
broadcast_to,
216-
can_cast,
217196
column_stack,
218197
concat,
219198
concatenate,
@@ -238,7 +217,6 @@
238217
require,
239218
reshape,
240219
resize,
241-
result_type,
242220
roll,
243221
rollaxis,
244222
rot90,
@@ -275,6 +253,20 @@
275253
right_shift,
276254
)
277255

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+
278270
# -----------------------------------------------------------------------------
279271
# Functional programming
280272
# -----------------------------------------------------------------------------
@@ -597,7 +589,7 @@
597589
# Public API
598590
# =============================================================================
599591

600-
# Data types, constants and type-related helpers
592+
# Data types
601593
__all__ = [
602594
"bool",
603595
"bool_",
@@ -608,7 +600,6 @@
608600
"complexfloating",
609601
"csingle",
610602
"double",
611-
"dtype",
612603
"float16",
613604
"float32",
614605
"float64",
@@ -638,6 +629,8 @@
638629
"ushort",
639630
"ulonglong",
640631
]
632+
633+
# Constants
641634
__all__ += [
642635
"e",
643636
"euler_gamma",
@@ -646,14 +639,6 @@
646639
"newaxis",
647640
"pi",
648641
]
649-
__all__ += [
650-
"common_type",
651-
"finfo",
652-
"iinfo",
653-
"isdtype",
654-
"issubdtype",
655-
"is_type_supported",
656-
]
657642

658643
# Array creation routines
659644
__all__ += [
@@ -708,7 +693,6 @@
708693
"atleast_3d",
709694
"broadcast_arrays",
710695
"broadcast_to",
711-
"can_cast",
712696
"column_stack",
713697
"concat",
714698
"concatenate",
@@ -733,7 +717,6 @@
733717
"require",
734718
"reshape",
735719
"resize",
736-
"result_type",
737720
"roll",
738721
"rollaxis",
739722
"rot90",
@@ -768,6 +751,19 @@
768751
"right_shift",
769752
]
770753

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+
771767
# Functional programming
772768
__all__ += [
773769
"apply_along_axis",

0 commit comments

Comments
 (0)