When i try to yield a Numpy array or Pandas data frame from a Stage I get an error.
It sais, the truth of Array or DataFrame is ambiguous. Use a.any() or a.all().
I can type cast results as normal list, and it works. Any chance there is a way to catch this error?
import numpy as np
from parallelpipe import stage
@stage()
def myfunc(prod):
for i in prod:
yield np.asarray(i)
prod = [[1,2],[2,3],[3,4]]
pipe = prod | myfunc()
for array in pipe.results():
print(array)