Skip to content

Commit cd27c27

Browse files
committed
🏷️ stub numpy.linalg.lapack_lite
1 parent 1153db7 commit cd27c27

File tree

3 files changed

+154
-16
lines changed

3 files changed

+154
-16
lines changed

.mypyignore-todo

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,24 @@ numpy(\..+)?\.floating.as_integer_ratio
88
numpy(\..+)?\.complexfloating.__hash__
99
numpy(\..+)?\.complexfloating.__complex__
1010

11-
numpy(\.lib\._polynomial_impl|\.matlib)?\.poly1d\.integ
12-
1311
numpy._globals._CopyMode.IF_NEEDED
1412
numpy._globals._CopyMode.__bool__
1513

16-
numpy._pyinstaller.hook-numpy
17-
1814
numpy.compat
1915
numpy.compat.py3k
2016

17+
numpy._pyinstaller.hook-numpy
2118
numpy.ctypeslib._ctypeslib
19+
numpy.fft.helper
20+
21+
numpy(\.lib\._polynomial_impl|\.matlib)?\.poly1d\.integ
22+
numpy.lib(._arrayterator_impl)?.Arrayterator.__array__
23+
numpy.lib.(_array_utils_impl|array_utils).normalize_axis_tuple
24+
numpy.lib._iotools.NameValidator.defaultdeletechars
25+
numpy.lib.format.open_memmap
26+
numpy.lib.format.read_array(_header_(1|2)_0)?
27+
numpy.lib.mixins.NDArrayOperatorsMixin.__array_ufunc__
28+
numpy.lib.recfunctions.unstructured_to_structured
2229

2330
numpy.distutils
2431

@@ -34,18 +41,6 @@ numpy.f2py.crackfortran
3441
numpy.f2py.symbolic
3542
numpy.f2py.((cb|common|f90mod|use)_)?rules
3643

37-
numpy.fft.helper
38-
39-
numpy.lib(._arrayterator_impl)?.Arrayterator.__array__
40-
numpy.lib.(_array_utils_impl|array_utils).normalize_axis_tuple
41-
numpy.lib._iotools.NameValidator.defaultdeletechars
42-
numpy.lib.format.open_memmap
43-
numpy.lib.format.read_array(_header_(1|2)_0)?
44-
numpy.lib.mixins.NDArrayOperatorsMixin.__array_ufunc__
45-
numpy.lib.recfunctions.unstructured_to_structured
46-
47-
numpy.linalg.lapack_lite
48-
4944
numpy.ma.testutils
5045
numpy.ma.timer_comparison
5146
numpy.ma.core._convert2ma.__doc__

src/numpy-stubs/linalg/_linalg.pyi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,8 @@ _LstSqResult: TypeAlias = tuple[Array[_ScalarT], Array[_FloatingT], np.int32, Ar
227227

228228
###
229229

230+
fortran_int = np.intc
231+
230232
class EigResult(NamedTuple, Generic[_InexactT_co]):
231233
eigenvalues: Array[_InexactT_co]
232234
eigenvectors: _Array_2nd[_InexactT_co]
Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
from typing import Any, Final, TypedDict, type_check_only
2+
3+
import numpy as np
4+
from numpy._typing import NDArray
5+
6+
from ._linalg import fortran_int
7+
8+
###
9+
10+
@type_check_only
11+
class _GELSD(TypedDict):
12+
m: int
13+
n: int
14+
nrhs: int
15+
lda: int
16+
ldb: int
17+
rank: int
18+
lwork: int
19+
info: int
20+
21+
@type_check_only
22+
class _DGELSD(_GELSD):
23+
dgelsd_: int
24+
rcond: float
25+
26+
@type_check_only
27+
class _ZGELSD(_GELSD):
28+
zgelsd_: int
29+
30+
@type_check_only
31+
class _GEQRF(TypedDict):
32+
m: int
33+
n: int
34+
lda: int
35+
lwork: int
36+
info: int
37+
38+
@type_check_only
39+
class _DGEQRF(_GEQRF):
40+
dgeqrf_: int
41+
42+
@type_check_only
43+
class _ZGEQRF(_GEQRF):
44+
zgeqrf_: int
45+
46+
@type_check_only
47+
class _DORGQR(TypedDict):
48+
dorgqr_: int
49+
info: int
50+
51+
@type_check_only
52+
class _ZUNGQR(TypedDict):
53+
zungqr_: int
54+
info: int
55+
56+
###
57+
58+
_ilp64: Final[bool] = ...
59+
60+
def dgelsd(
61+
m: int,
62+
n: int,
63+
nrhs: int,
64+
a: NDArray[np.float64],
65+
lda: int,
66+
b: NDArray[np.float64],
67+
ldb: int,
68+
s: NDArray[np.float64],
69+
rcond: float,
70+
rank: int,
71+
work: NDArray[np.float64],
72+
lwork: int,
73+
iwork: NDArray[fortran_int],
74+
info: int,
75+
) -> _DGELSD: ...
76+
def zgelsd(
77+
m: int,
78+
n: int,
79+
nrhs: int,
80+
a: NDArray[np.complex128],
81+
lda: int,
82+
b: NDArray[np.complex128],
83+
ldb: int,
84+
s: NDArray[np.float64],
85+
rcond: float,
86+
rank: int,
87+
work: NDArray[np.complex128],
88+
lwork: int,
89+
rwork: NDArray[np.float64],
90+
iwork: NDArray[fortran_int],
91+
info: int,
92+
) -> _ZGELSD: ...
93+
94+
#
95+
def dgeqrf(
96+
m: int,
97+
n: int,
98+
a: NDArray[np.float64], # in/out, shape: (lda, n)
99+
lda: int,
100+
tau: NDArray[np.float64], # out, shape: (min(m, n),)
101+
work: NDArray[np.float64], # out, shape: (max(1, lwork),)
102+
lwork: int,
103+
info: int, # out
104+
) -> _DGEQRF: ...
105+
def zgeqrf(
106+
m: int,
107+
n: int,
108+
a: NDArray[np.complex128], # in/out, shape: (lda, n)
109+
lda: int,
110+
tau: NDArray[np.complex128], # out, shape: (min(m, n),)
111+
work: NDArray[np.complex128], # out, shape: (max(1, lwork),)
112+
lwork: int,
113+
info: int, # out
114+
) -> _ZGEQRF: ...
115+
116+
#
117+
def dorgqr(
118+
m: int, # >=0
119+
n: int, # m >= n >= 0
120+
k: int, # n >= k >= 0
121+
a: NDArray[np.float64], # in/out, shape: (lda, n)
122+
lda: int, # >= max(1, m)
123+
tau: NDArray[np.float64], # in, shape: (k,)
124+
work: NDArray[np.float64], # out, shape: (max(1, lwork),)
125+
lwork: int,
126+
info: int, # out
127+
) -> _DORGQR: ...
128+
def zungqr(
129+
m: int,
130+
n: int,
131+
k: int,
132+
a: NDArray[np.complex128],
133+
lda: int,
134+
tau: NDArray[np.complex128],
135+
work: NDArray[np.complex128],
136+
lwork: int,
137+
info: int,
138+
) -> _ZUNGQR: ...
139+
140+
#
141+
def xerbla(srname: Any, info: int) -> None: ...

0 commit comments

Comments
 (0)