I can identify my non-pipe elements, no problem. I’ll get their category and I can imagine filtering them out of the original list with a FilterByBoolMask node. I’m just not sure how I can replace those elements for a list…
There may be easier ways but it works.
For anyone interested, the python code goes like this:
# The inputs to this node will be stored as a list in the IN variables.
dataEnteringNode = IN
# Place your code below this line
indexes = IN[0]
totals = IN[1]
output = []
k=0
for index in indexes:
temp=[]
prev=0
last=0
for i in index:
j=i-prev
prev=i
temp.append(j)
last = totals[k]-i
k=k+1
temp.append(last)
output.append(temp)
# Assign your output to the OUT variable.
OUT = output