Skip to content

Commit

Permalink
Remove pandas
Browse files Browse the repository at this point in the history
  • Loading branch information
lcmmichielsen committed Jul 20, 2021
1 parent ee35f64 commit 2fabc5d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.spyproject/
7 changes: 5 additions & 2 deletions scHPL/learn.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,12 @@ def learn_tree(data: anndata,
labels_1 = labels[idx_1]
data_1 = xx[idx_1]

print('Starting tree:')
print_tree(tree)

for b in batch_order:

print('Adding dataset', str(b), 'to the tree')
print('\nAdding dataset', str(b), 'to the tree')

idx_2 = np.where(batches == b)[0]
data_2 = xx[idx_2]
Expand Down Expand Up @@ -121,7 +124,7 @@ def learn_tree(data: anndata,
return_missing = return_missing)
missing_pop.extend(mis_pop)

print('Updated tree:')
print('\nUpdated tree:')
print_tree(tree)

#concatenate the two datasets
Expand Down
2 changes: 1 addition & 1 deletion scHPL/update.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def _match_trees(X, tree, y_true, pop2):
# scan binary matrix
binary, y_true, pop2 = _scan_binary(binary, name_root1, name_root2, y_true, tree, pop2)

strict.iloc[binary.values == False] = False
strict.values[binary.values == False] = False

# scan strict matrix if needed
if (np.any(strict)):
Expand Down

0 comments on commit 2fabc5d

Please sign in to comment.