Skip to content

Commit 1d10086

Browse files
removed remaining xarrax references
1 parent 72d73fc commit 1d10086

File tree

6 files changed

+10
-26
lines changed

6 files changed

+10
-26
lines changed

batchglm/models/base/external.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
import batchglm.pkg_constants as pkg_constants
22
import batchglm.data as data_utils
3-
from batchglm.xarray_sparse import SparseXArrayDataSet, SparseXArrayDataArray

batchglm/models/glm_nb/model.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import anndata
44
except ImportError:
55
anndata = None
6-
import xarray as xr
76
import numpy as np
87

98
from .external import _ModelGLM
@@ -27,7 +26,7 @@ def inverse_link_scale(self, data):
2726
return np.exp(data)
2827

2928
@property
30-
def eta_loc(self) -> xr.DataArray:
29+
def eta_loc(self) -> np.ndarray:
3130
eta = np.matmul(self.design_loc, self.a)
3231
if self.size_factors is not None:
3332
eta += np.expand_dims(self.size_factors, axis=1)
@@ -36,9 +35,9 @@ def eta_loc(self) -> xr.DataArray:
3635
# Re-parameterizations:
3736

3837
@property
39-
def mu(self) -> xr.DataArray:
38+
def mu(self) -> np.ndarray:
4039
return self.location
4140

4241
@property
43-
def phi(self) -> xr.DataArray:
42+
def phi(self) -> np.ndarray:
4443
return self.scale

batchglm/train/tf/base_glm/estimator_graph.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
import numpy as np
66
import tensorflow as tf
7-
import xarray as xr
87

98
try:
109
import anndata
@@ -1243,8 +1242,8 @@ def __init__(
12431242
num_scale_params: int,
12441243
graph: tf.Graph,
12451244
batch_size: int,
1246-
constraints_loc: xr.DataArray,
1247-
constraints_scale: xr.DataArray,
1245+
constraints_loc: np.ndarray,
1246+
constraints_scale: np.ndarray,
12481247
dtype: str
12491248
):
12501249
"""

batchglm/train/tf/base_glm_all/estimator_graph.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
1-
from typing import Union
21
import logging
3-
4-
import tensorflow as tf
52
import numpy as np
6-
import xarray as xr
3+
import tensorflow as tf
4+
from typing import Union
75

86
from .external import EstimatorGraphGLM, FullDataModelGraphGLM, BatchedDataModelGraphGLM, ModelVarsGLM
9-
from .external import op_utils
107
from .external import pkg_constants
118

129
logger = logging.getLogger(__name__)
@@ -372,8 +369,8 @@ def __init__(
372369
num_design_scale_params,
373370
num_loc_params,
374371
num_scale_params,
375-
constraints_loc: xr.DataArray,
376-
constraints_scale: xr.DataArray,
372+
constraints_loc: np.ndarray,
373+
constraints_scale: np.ndarray,
377374
graph: tf.Graph,
378375
batch_size: int,
379376
init_a,

batchglm/train/tf/glm_nb/model.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import logging
2-
3-
import tensorflow as tf
4-
52
import numpy as np
3+
import tensorflow as tf
64

75
from .external import ProcessModelGLM, ModelVarsGLM, BasicModelGraphGLM
86
from .external import pkg_constants

docs/api/index.rst

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,6 @@ Preprocessing
2020
:toctree: .
2121

2222
data.design_matrix
23-
data.design_matrix_from_xarray
24-
data.design_matrix_from_anndata
25-
data.sample_description_from_xarray
26-
data.sample_description_from_anndata
27-
data.load_mtx_to_adata
28-
data.load_mtx_to_xarray
29-
data.load_recursive_mtx
30-
data.xarray_from_data
3123

3224

3325
Fitting models

0 commit comments

Comments
 (0)