Skip to content

Commit

Permalink
sparse: Add re-exported functions to __all__ for public private s…
Browse files Browse the repository at this point in the history
…ubmodules
  • Loading branch information
pavyamsiri committed Oct 6, 2024
1 parent e105065 commit 060db27
Show file tree
Hide file tree
Showing 20 changed files with 261 additions and 63 deletions.
31 changes: 28 additions & 3 deletions scipy-stubs/sparse/base.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,29 @@
from scipy._typing import Untyped
# This module is not meant for public use and will be removed in SciPy v2.0.0.
# This stub simply re-exports the imported functions.
from ._base import (
MAXPRINT,
SparseEfficiencyWarning,
SparseFormatWarning,
SparseWarning,
issparse,
isspmatrix,
spmatrix,
)
from ._sputils import *

def __dir__() -> Untyped: ...
def __getattr__(name) -> Untyped: ...
__all__ = [
"MAXPRINT",
"SparseEfficiencyWarning",
"SparseFormatWarning",
"SparseWarning",
"asmatrix",
"check_reshape_kwargs",
"check_shape",
"get_sum_dtype",
"isdense",
"isscalarlike",
"issparse",
"isspmatrix",
"spmatrix",
"validateaxis",
]
27 changes: 24 additions & 3 deletions scipy-stubs/sparse/bsr.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,25 @@
from scipy._typing import Untyped
# This module is not meant for public use and will be removed in SciPy v2.0.0.
# This stub simply re-exports the imported functions.
# TODO: Add type annotated dummy functions marked deprecated.
# TODO: The imports are actually from a generated file which doesn't currently have a stub.
from ._bsr import *

def __dir__() -> Untyped: ...
def __getattr__(name) -> Untyped: ...
__all__ = [
"bsr_matmat",
"bsr_matrix",
"bsr_matvec",
"bsr_matvecs",
"bsr_sort_indices",
"bsr_tocsr",
"bsr_transpose",
"check_shape",
"csr_matmat_maxnnz",
"getdata",
"getdtype",
"isshape",
"isspmatrix_bsr",
"spmatrix",
"to_native",
"upcast",
"warn",
]
36 changes: 33 additions & 3 deletions scipy-stubs/sparse/compressed.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,34 @@
from scipy._typing import Untyped
# This module is not meant for public use and will be removed in SciPy v2.0.0.
# This stub simply re-exports the imported functions.
# TODO: Add type annotated dummy functions marked deprecated.
from ._base import *
from ._compressed import *
from ._index import *
from ._sputils import *

def __dir__() -> Untyped: ...
def __getattr__(name) -> Untyped: ...
__all__ = [
"IndexMixin",
"SparseEfficiencyWarning",
"check_shape",
"csr_column_index1",
"csr_column_index2",
"csr_row_index",
"csr_row_slice",
"csr_sample_offsets",
"csr_sample_values",
"csr_todense",
"downcast_intp_index",
"get_csr_submatrix",
"get_sum_dtype",
"getdtype",
"is_pydata_spmatrix",
"isdense",
"isintlike",
"isscalarlike",
"isshape",
"operator",
"to_native",
"upcast",
"upcast_char",
"warn",
]
42 changes: 39 additions & 3 deletions scipy-stubs/sparse/construct.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,40 @@
from scipy._typing import Untyped
# This module is not meant for public use and will be removed in SciPy v2.0.0.
# This stub simply re-exports the imported functions.
# TODO: Add type annotated dummy functions marked deprecated.
# TODO: The imports are actually from a generated file which doesn't currently have a stub.
from scipy._lib._util import check_random_state, rng_integers
from ._base import *
from ._bsr import bsr_matrix
from ._construct import *
from ._coo import coo_matrix
from ._csc import csc_matrix
from ._csr import csr_matrix
from ._dia import dia_matrix
from ._sputils import get_index_dtype, isscalarlike, upcast

def __dir__() -> Untyped: ...
def __getattr__(name) -> Untyped: ...
__all__ = [
"block_diag",
"bmat",
"bsr_matrix",
"check_random_state",
"coo_matrix",
"csc_matrix",
"csr_hstack",
"csr_matrix",
"dia_matrix",
"diags",
"eye",
"get_index_dtype",
"hstack",
"identity",
"isscalarlike",
"issparse",
"kron",
"kronsum",
"rand",
"random",
"rng_integers",
"spdiags",
"upcast",
"vstack",
]
28 changes: 25 additions & 3 deletions scipy-stubs/sparse/coo.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,26 @@
from scipy._typing import Untyped
# This module is not meant for public use and will be removed in SciPy v2.0.0.
# This stub simply re-exports the imported functions.
# TODO: Add type annotated dummy functions marked deprecated.
# TODO: The imports are actually from a generated file which doesn't currently have a stub.
from ._coo import *

def __dir__() -> Untyped: ...
def __getattr__(name) -> Untyped: ...
__all__ = [
"SparseEfficiencyWarning",
"check_reshape_kwargs",
"check_shape",
"coo_matrix",
"coo_matvec",
"coo_tocsr",
"coo_todense",
"downcast_intp_index",
"getdata",
"getdtype",
"isshape",
"isspmatrix_coo",
"operator",
"spmatrix",
"to_native",
"upcast",
"upcast_char",
"warn",
]
9 changes: 6 additions & 3 deletions scipy-stubs/sparse/csc.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
from scipy._typing import Untyped
# This module is not meant for public use and will be removed in SciPy v2.0.0.
# This stub simply re-exports the imported functions.
# TODO: Add type annotated dummy functions marked deprecated.
# TODO: The imports are actually from a generated file which doesn't currently have a stub.
from ._csc import *

def __dir__() -> Untyped: ...
def __getattr__(name) -> Untyped: ...
__all__ = ["csc_matrix", "csc_tocsr", "expandptr", "isspmatrix_csc", "spmatrix", "upcast"]
18 changes: 15 additions & 3 deletions scipy-stubs/sparse/csr.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
from scipy._typing import Untyped
# This module is not meant for public use and will be removed in SciPy v2.0.0.
# This stub simply re-exports the imported functions.
# TODO: Add type annotated dummy functions marked deprecated.
# TODO: The imports are actually from a generated file which doesn't currently have a stub.
from ._csr import *

def __dir__() -> Untyped: ...
def __getattr__(name) -> Untyped: ...
__all__ = [
"csr_count_blocks",
"csr_matrix",
"csr_tobsr",
"csr_tocsc",
"get_csr_submatrix",
"isspmatrix_csr",
"spmatrix",
"upcast",
]
9 changes: 6 additions & 3 deletions scipy-stubs/sparse/data.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
from scipy._typing import Untyped
# This module is not meant for public use and will be removed in SciPy v2.0.0.
# This stub simply re-exports the imported functions.
# TODO: Add type annotated dummy functions marked deprecated.
# TODO: Exported functions are missing from private module
from ._data import *

def __dir__() -> Untyped: ...
def __getattr__(name) -> Untyped: ...
__all__ = ["isscalarlike", "name", "npfunc", "validateaxis"]
25 changes: 22 additions & 3 deletions scipy-stubs/sparse/dia.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,23 @@
from scipy._typing import Untyped
# This module is not meant for public use and will be removed in SciPy v2.0.0.
# This stub simply re-exports the imported functions.
# TODO: Add type annotated dummy functions marked deprecated.
# TODO: The imports are actually from a generated file which doesn't currently have a stub.
from ._base import *
from ._construct import *
from ._dia import *
from ._dia import dia_matrix
from ._matrix import spmatrix
from ._sputils import *

def __dir__() -> Untyped: ...
def __getattr__(name) -> Untyped: ...
__all__ = [
"check_shape",
"dia_matrix",
"dia_matvec",
"get_sum_dtype",
"getdtype",
"isshape",
"isspmatrix_dia",
"spmatrix",
"upcast_char",
"validateaxis",
]
26 changes: 23 additions & 3 deletions scipy-stubs/sparse/dok.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,24 @@
from scipy._typing import Untyped
# This module is not meant for public use and will be removed in SciPy v2.0.0.
# This stub simply re-exports the imported functions.
# TODO: Add type annotated dummy functions marked deprecated.
# TODO: The imports are actually from a generated file which doesn't currently have a stub.

def __dir__() -> Untyped: ...
def __getattr__(name) -> Untyped: ...
from ._dok import *
from ._index import IndexMixin
from ._matrix import spmatrix
from ._sputils import check_shape, getdtype, isdense, isintlike, isscalarlike, isshape, upcast, upcast_scalar

__all__ = [
"IndexMixin",
"check_shape",
"dok_matrix",
"getdtype",
"isdense",
"isintlike",
"isscalarlike",
"isshape",
"isspmatrix_dok",
"spmatrix",
"upcast",
"upcast_scalar",
]
8 changes: 5 additions & 3 deletions scipy-stubs/sparse/extract.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
from scipy._typing import Untyped
# This module is not meant for public use and will be removed in SciPy v2.0.0.
# This stub simply re-exports the imported functions.
# TODO: Add type annotated dummy functions marked deprecated.
from ._extract import *

def __dir__() -> Untyped: ...
def __getattr__(name) -> Untyped: ...
__all__ = ["coo_matrix", "find", "tril", "triu"]
8 changes: 5 additions & 3 deletions scipy-stubs/sparse/lil.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
from scipy._typing import Untyped
# This module is not meant for public use and will be removed in SciPy v2.0.0.
# This stub simply re-exports the imported functions.
# TODO: Add type annotated dummy functions marked deprecated.
from ._lil import *

def __dir__() -> Untyped: ...
def __getattr__(name) -> Untyped: ...
__all__ = ["isspmatrix_lil", "lil_array", "lil_matrix"]
8 changes: 5 additions & 3 deletions scipy-stubs/sparse/linalg/dsolve.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
from scipy._typing import Untyped
# This module is not meant for public use and will be removed in SciPy v2.0.0.
# This stub simply re-exports the imported functions.
# TODO: Add type annotated dummy functions marked deprecated.
from ._dsolve import *

def __dir__() -> Untyped: ...
def __getattr__(name) -> Untyped: ...
__all__ = ["MatrixRankWarning", "SuperLU", "factorized", "spilu", "splu", "spsolve", "spsolve_triangular", "use_solver"]
8 changes: 5 additions & 3 deletions scipy-stubs/sparse/linalg/eigen.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
from scipy._typing import Untyped
# This module is not meant for public use and will be removed in SciPy v2.0.0.
# This stub simply re-exports the imported functions.
# TODO: Add type annotated dummy functions marked deprecated.
from ._eigen import *

def __dir__() -> Untyped: ...
def __getattr__(name) -> Untyped: ...
__all__ = ["ArpackError", "ArpackError", "ArpackNoConvergence", "eigs", "eigsh", "lobpcg", "svds"]
8 changes: 5 additions & 3 deletions scipy-stubs/sparse/linalg/interface.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
from scipy._typing import Untyped
# This module is not meant for public use and will be removed in SciPy v2.0.0.
# This stub simply re-exports the imported functions.
# TODO: Add type annotated dummy functions marked deprecated.
from ._interface import *

def __dir__() -> Untyped: ...
def __getattr__(name) -> Untyped: ...
__all__ = ["LinearOperator", "aslinearoperator"]
8 changes: 5 additions & 3 deletions scipy-stubs/sparse/linalg/isolve.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
from scipy._typing import Untyped
# This module is not meant for public use and will be removed in SciPy v2.0.0.
# This stub simply re-exports the imported functions.
# TODO: Add type annotated dummy functions marked deprecated.
from ._isolve import *

def __dir__() -> Untyped: ...
def __getattr__(name) -> Untyped: ...
__all__ = ["bicg", "bicgstab", "cg", "cgs", "gcrotmk", "gmres", "lgmres", "lsmr", "lsqr", "minres", "qmr", "tfqmr"]
10 changes: 7 additions & 3 deletions scipy-stubs/sparse/linalg/matfuncs.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
from scipy._typing import Untyped
# This module is not meant for public use and will be removed in SciPy v2.0.0.
# This stub simply re-exports the imported functions.
# TODO: Add type annotated dummy functions marked deprecated.
from ._dsolve import spsolve
from ._interface import *
from ._matfuncs import *

def __dir__() -> Untyped: ...
def __getattr__(name) -> Untyped: ...
__all__ = ["LinearOperator", "expm", "inv", "spsolve"]
5 changes: 1 addition & 4 deletions scipy-stubs/sparse/sparsetools.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
from scipy._typing import Untyped

def __dir__() -> Untyped: ...
def __getattr__(name) -> Untyped: ...
__all__ = []
5 changes: 1 addition & 4 deletions scipy-stubs/sparse/spfuncs.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
from scipy._typing import Untyped

def __dir__() -> Untyped: ...
def __getattr__(name) -> Untyped: ...
__all__ = []
5 changes: 1 addition & 4 deletions scipy-stubs/sparse/sputils.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
from scipy._typing import Untyped

def __dir__() -> Untyped: ...
def __getattr__(name) -> Untyped: ...
__all__ = []

0 comments on commit 060db27

Please sign in to comment.