Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions pydra/engine/state.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from copy import deepcopy
import itertools
from functools import reduce
from math import prod
import logging
import typing as ty
from pydra.utils.typing import StateArray, TypeParser
Expand Down Expand Up @@ -1150,12 +1150,12 @@
else:
container_ndim = self.container_ndim_all.get(term, 1)
shape = input_shape(self.inputs[term], container_ndim=container_ndim)
var_ind = range(reduce(lambda x, y: x * y, shape))
var_ind = range(prod(shape))

Check warning on line 1153 in pydra/engine/state.py

View check run for this annotation

Codecov / codecov/patch

pydra/engine/state.py#L1153

Added line #L1153 was not covered by tests
new_keys = [term]
# checking if the term is in inner_inputs
if term in self.inner_inputs:
# TODO: have to be changed if differ length
inner_len = [shape[-1]] * reduce(lambda x, y: x * y, shape[:-1])
inner_len = [shape[-1]] * prod(shape[:-1])

Check warning on line 1158 in pydra/engine/state.py

View check run for this annotation

Codecov / codecov/patch

pydra/engine/state.py#L1158

Added line #L1158 was not covered by tests
# this come from the previous node
outer_ind = self.inner_inputs[term].ind_l
var_ind_out = itertools.chain.from_iterable(
Expand All @@ -1172,10 +1172,10 @@
self.inputs[op_single],
container_ndim=self.container_ndim_all.get(op_single, 1),
)
val_ind = range(reduce(lambda x, y: x * y, shape))
val_ind = range(prod(shape))
if op_single in self.inner_inputs:
# TODO: have to be changed if differ length
inner_len = [shape[-1]] * reduce(lambda x, y: x * y, shape[:-1], 1)
inner_len = [shape[-1]] * prod(shape[:-1])

Check warning on line 1178 in pydra/engine/state.py

View check run for this annotation

Codecov / codecov/patch

pydra/engine/state.py#L1178

Added line #L1178 was not covered by tests

# this come from the previous node
outer_ind = self.inner_inputs[op_single].ind_l
Expand Down
Loading