File tree Expand file tree Collapse file tree 7 files changed +12
-17
lines changed
Expand file tree Collapse file tree 7 files changed +12
-17
lines changed Original file line number Diff line number Diff line change 11from batchglm .models .base .estimator import EstimatorBaseTyping
2- from batchglm .models .base .input import InputDataBaseTyping
2+ from batchglm .models .base .input import InputDataBase
Original file line number Diff line number Diff line change 1- from .input import _InputDataBase , InputDataBaseTyping
1+ from .input import InputDataBase , InputDataBase
22from .estimator import _EstimatorBase , EstimatorBaseTyping
33from .model import _ModelBase
44from .simulator import _SimulatorBase
Original file line number Diff line number Diff line change 99except ImportError :
1010 anndata = None
1111
12- from .input import _InputDataBase
12+ from .input import InputDataBase
1313from .model import _ModelBase
1414
1515logger = logging .getLogger (__name__ )
@@ -29,7 +29,7 @@ class TrainingStrategy(Enum):
2929 def __init__ (
3030 self ,
3131 model : _ModelBase ,
32- input_data : _InputDataBase
32+ input_data : InputDataBase
3333 ):
3434 self .model = model
3535 self .input_data = input_data
Original file line number Diff line number Diff line change 1111logger = logging .getLogger (__name__ )
1212
1313
14- class _InputDataBase :
14+ class InputDataBase :
1515 """
1616 Base class for all input data types.
1717 """
@@ -45,7 +45,7 @@ def __init__(
4545 self .x = data
4646 elif isinstance (data , anndata .AnnData ) or isinstance (data , anndata .Raw ):
4747 self .x = data .X
48- elif isinstance (data , _InputDataBase ):
48+ elif isinstance (data , InputDataBase ):
4949 self .x = data .x
5050 else :
5151 raise ValueError ("type of data %s not recognized" % type (data ))
@@ -90,8 +90,3 @@ def fetch_x_sparse(self, idx):
9090 data_idx = np .squeeze (data_idx , axis = 0 )
9191
9292 return data_idx , data_val , data_shape
93-
94- class InputDataBaseTyping :
95- """
96- Input data base class used for typing in other packages.
97- """
Original file line number Diff line number Diff line change 88except ImportError :
99 anndata = None
1010
11- from .input import _InputDataBase
11+ from .input import InputDataBase
1212from .model import _ModelBase
1313
1414logger = logging .getLogger (__name__ )
@@ -26,7 +26,7 @@ class _SimulatorBase(metaclass=abc.ABCMeta):
2626 nobs : int
2727 nfeatures : int
2828
29- input_data : _InputDataBase
29+ input_data : InputDataBase
3030 model : _ModelBase
3131
3232 def __init__ (
Original file line number Diff line number Diff line change 11from batchglm .models .base import _EstimatorBase
2- from batchglm .models .base import _InputDataBase
2+ from batchglm .models .base import InputDataBase
33from batchglm .models .base import _ModelBase
44from batchglm .models .base import _SimulatorBase
55
Original file line number Diff line number Diff line change 1010from typing import Union
1111
1212from .utils import parse_constraints , parse_design
13- from .external import _InputDataBase
13+ from .external import InputDataBase
1414
1515
16- class InputDataGLM (_InputDataBase ):
16+ class InputDataGLM (InputDataBase ):
1717 """
1818 Input data for Generalized Linear Models (GLMs).
1919 """
@@ -76,7 +76,7 @@ def __init__(
7676 If this option is set, all provided data will be casted to this data type.
7777 :return: InputData object
7878 """
79- _InputDataBase .__init__ (
79+ InputDataBase .__init__ (
8080 self = self ,
8181 data = data ,
8282 observation_names = observation_names ,
You can’t perform that action at this time.
0 commit comments