Skip to content

Commit 2cd50c4

Browse files
Consolidate dpnp.linalg public API in __init__.py
1 parent 4082593 commit 2cd50c4

File tree

3 files changed

+34
-60
lines changed

3 files changed

+34
-60
lines changed

dpnp/linalg/__init__.py

Lines changed: 34 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,6 @@
3838

3939
from .dpnp_iface_linalg import (
4040
LinAlgError,
41-
)
42-
from .dpnp_iface_linalg import __all__ as __all__linalg
43-
from .dpnp_iface_linalg import (
4441
cholesky,
4542
cond,
4643
cross,
@@ -74,4 +71,37 @@
7471
vector_norm,
7572
)
7673

77-
__all__ = __all__linalg
74+
__all__ = [
75+
"LinAlgError",
76+
"cholesky",
77+
"cond",
78+
"cross",
79+
"det",
80+
"diagonal",
81+
"eig",
82+
"eigh",
83+
"eigvals",
84+
"eigvalsh",
85+
"inv",
86+
"lstsq",
87+
"matmul",
88+
"matrix_norm",
89+
"matrix_power",
90+
"matrix_rank",
91+
"matrix_transpose",
92+
"multi_dot",
93+
"norm",
94+
"outer",
95+
"pinv",
96+
"qr",
97+
"solve",
98+
"svd",
99+
"svdvals",
100+
"slogdet",
101+
"tensordot",
102+
"tensorinv",
103+
"tensorsolve",
104+
"trace",
105+
"vecdot",
106+
"vector_norm",
107+
]

dpnp/linalg/dpnp_iface_linalg.py

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -72,41 +72,6 @@
7272
dpnp_svd,
7373
)
7474

75-
__all__ = [
76-
"LinAlgError",
77-
"cholesky",
78-
"cond",
79-
"cross",
80-
"det",
81-
"diagonal",
82-
"eig",
83-
"eigh",
84-
"eigvals",
85-
"eigvalsh",
86-
"inv",
87-
"lstsq",
88-
"matmul",
89-
"matrix_norm",
90-
"matrix_power",
91-
"matrix_rank",
92-
"matrix_transpose",
93-
"multi_dot",
94-
"norm",
95-
"outer",
96-
"pinv",
97-
"qr",
98-
"solve",
99-
"svd",
100-
"svdvals",
101-
"slogdet",
102-
"tensordot",
103-
"tensorinv",
104-
"tensorsolve",
105-
"trace",
106-
"vecdot",
107-
"vector_norm",
108-
]
109-
11075
# Need to set the module explicitly, because it's initially exposed by LAPACK
11176
# pybind11 extension and to add the docstrings
11277
LinAlgError.__module__ = "dpnp.linalg"

dpnp/linalg/dpnp_utils_linalg.py

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -54,27 +54,6 @@
5454
import dpnp.backend.extensions.lapack._lapack_impl as li
5555
from dpnp.dpnp_utils import get_usm_allocations
5656

57-
__all__ = [
58-
"assert_2d",
59-
"assert_stacked_2d",
60-
"assert_stacked_square",
61-
"dpnp_cholesky",
62-
"dpnp_cond",
63-
"dpnp_det",
64-
"dpnp_eigh",
65-
"dpnp_inv",
66-
"dpnp_lstsq",
67-
"dpnp_matrix_power",
68-
"dpnp_matrix_rank",
69-
"dpnp_multi_dot",
70-
"dpnp_norm",
71-
"dpnp_pinv",
72-
"dpnp_qr",
73-
"dpnp_slogdet",
74-
"dpnp_solve",
75-
"dpnp_svd",
76-
]
77-
7857

7958
# pylint:disable=missing-class-docstring
8059
class EighResult(NamedTuple):

0 commit comments

Comments
 (0)