lapack_lite.pyi 2.6 KB

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