Skip to content

Conversation

@effigies
Copy link
Member

Summary

In 39c4ee3, we had

 def _generate_dependency_list(self, graph): """ Generates a dependency list for a list of graphs. """ self.procs = graph.nodes() - self.depidx = nx.adj_matrix(graph).__array__() - self.refidx = deepcopy(self.depidx>0) - self.refidx.dtype = np.int8 + self.depidx = ssp.lil_matrix(nx.adj_matrix(graph).__array__()) + self.refidx = deepcopy(self.depidx) + self.refidx.astype = np.int self.proc_done = np.zeros(len(self.procs), dtype=bool) self.proc_pending = np.zeros(len(self.procs), dtype=bool)

This looks like a typo, that should have been self.refidx = deepcopy(self.depidx).astype(np.int) or similar.

In this PR, I simply use self.depidx.astype(int). scipy.sparse.lil_matrix.astype copies by default.

Found while removing a deprecated call to np.int.

I also remove a guard for networkx versions that were old in 2012: b908b84

@codecov
Copy link

codecov bot commented May 30, 2021

Codecov Report

Merging #3340 (f250f5c) into master (d02750a) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@ Coverage Diff @@ ## master #3340 +/- ## ======================================= Coverage 65.01% 65.01% ======================================= Files 302 302 Lines 40035 40031 -4 Branches 5291 5291 ======================================= - Hits 26029 26027 -2  + Misses 12935 12933 -2  Partials 1071 1071 
Flag Coverage Δ
unittests 64.79% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
nipype/pipeline/plugins/base.py 58.17% <100.00%> (+0.08%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d02750a...f250f5c. Read the comment docs.

@effigies
Copy link
Member Author

Didn't break things. Will merge before a 1.6.1 release, unless I see an objection.

@effigies effigies added this to the 1.6.1 milestone May 30, 2021
@effigies effigies merged commit 61846d5 into nipy:master Jun 2, 2021
@effigies effigies deleted the fix/astype branch June 2, 2021 12:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant