Skip to content
Snippets Groups Projects
Commit df5f830a authored by Arin Wongprommoon's avatar Arin Wongprommoon
Browse files

[WIP] fix(postproc): picker uses correct type for intersection

WHY IS THIS CHANGE NEEDED?:
- TypeError re unhashable type raised when picker was invoked on an
  experiment that was long enough to have mother-daughter assignments

HOW DOES THE CHANGE SOLVE THE PROBLEM?:
- self.cells.mothers_daughters is a 2d numpy array and thus its columns
  are 1d numpy arrays.  the elements of new_indices are thus also 1d
  numpy arrays and therefore non-hashable, which intersection() doesn't like
- in 0.1.46, self.mothers and self.daughters were outputs of
  picker.get_mothers_daughters(), which returned tuples and were
  therefore hashable.  the for loop (line 108) hasn't changed.  so i
  reasoned that it was a typing issue and a simple type change should work.

WHAT SIDE EFFECTS DOES THIS CHANGE HAVE?:
- yet to see

EVIDENCE THAT COMMIT WORKS:
- yet to test with e.g. long unit test (staffa:560 doesn't give
  mother-daughter assignments as it is too short)

REFERENCES:
- issue #37, particularly
  aliby#37 (comment 113353)
parent ab5f3eee
No related branches found
No related tags found
No related merge requests found
......@@ -102,8 +102,8 @@ class picker(LineageProcess):
self.daughters = np.array([])
else:
self.mothers, self.daughters = (
self.cells.mothers_daughters[:, 1],
self.cells.mothers_daughters[:, 2],
tuple(self.cells.mothers_daughters[:, 1]),
tuple(self.cells.mothers_daughters[:, 2]),
)
for alg, op, *params in self.sequence:
new_indices = tuple()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment