Skip to content

Commit

Permalink
fixed constraint unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
davidsebfischer committed Sep 4, 2019
1 parent 2a24bd9 commit 0e8f77d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions batchglm/unit_test/test_acc_constrained_vglm_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,11 @@ def simulate(self):
constraints[1, 1] = 1
constraints[2, 2] = 1
constraints[3, 2] = -1
new_coef_names = ['Intercept', 'condition[T.1]', 'batch[1]', 'batch[2]']
self.sim1.input_data.design_loc = dmat
self.sim1.input_data.design_scale = dmat
self.sim1.input_data._design_loc_names = new_coef_names
self.sim1.input_data._design_scale_names = new_coef_names
self.sim1.input_data.constraints_loc = constraints
self.sim1.input_data.constraints_scale = constraints

Expand Down
4 changes: 4 additions & 0 deletions batchglm/unit_test/test_acc_glm_all.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ def __init__(
data=scipy.sparse.csr_matrix(simulator.input_data.x),
design_loc=simulator.input_data.design_loc,
design_scale=simulator.input_data.design_scale,
design_loc_names=simulator.input_data.design_loc_names,
design_scale_names=simulator.input_data.design_scale_names,
constraints_loc=simulator.input_data.constraints_loc,
constraints_scale=simulator.input_data.constraints_scale,
size_factors=simulator.input_data.size_factors
Expand All @@ -59,6 +61,8 @@ def __init__(
data=simulator.input_data.x,
design_loc=simulator.input_data.design_loc,
design_scale=simulator.input_data.design_scale,
design_loc_names=simulator.input_data.design_loc_names,
design_scale_names=simulator.input_data.design_scale_names,
constraints_loc=simulator.input_data.constraints_loc,
constraints_scale=simulator.input_data.constraints_scale,
size_factors=simulator.input_data.size_factors
Expand Down

0 comments on commit 0e8f77d

Please sign in to comment.