Skip to content

Commit b4f49ff

Browse files
committed
added type var to state array instantiations
1 parent 2a831dc commit b4f49ff

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pydra/engine/specs.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -968,7 +968,7 @@ def get_value(
968968
def apply_splits(obj, depth):
969969
if depth < 1:
970970
return obj
971-
return StateArray(apply_splits(i, depth - 1) for i in obj)
971+
return StateArray[self.type](apply_splits(i, depth - 1) for i in obj)
972972

973973
value = apply_splits(value, split_depth)
974974
value = self._apply_cast(value)
@@ -1012,7 +1012,7 @@ def get_nested_results(res, depth: int):
10121012
if not depth:
10131013
val = [r.get_output_field(self.field) for r in res]
10141014
else:
1015-
val = StateArray(
1015+
val = StateArray[self.type](
10161016
get_nested_results(res=r, depth=depth - 1) for r in res
10171017
)
10181018
else:
@@ -1024,7 +1024,7 @@ def get_nested_results(res, depth: int):
10241024
val = res.get_output_field(self.field)
10251025
if depth and not wf._pre_split:
10261026
assert isinstance(val, ty.Sequence) and not isinstance(val, str)
1027-
val = StateArray(val)
1027+
val = StateArray[self.type](val)
10281028
return val
10291029

10301030
value = get_nested_results(result, depth=split_depth)

0 commit comments

Comments
 (0)