I realize this gets asked a lot but i have some trouble understanding list levels, again…
I have a list of lists of elements, and a list of lists of lists of values and keys:
So the values and keys are a list for each element.
Can someone tell me how to set the levels so that the list of keys and values get set for every element?
IMO flattening your lists will save you a lot of troubles regarding to Levels.
Level might be at @1. I always struggle with that .
Yeah true… But i can’t flatten my lists since the list structure of the families tell me what element is hosting the families (each list of families is a host) If i flatten my lists i lose the ability to do further comparisons with the families and their host
I doubt if that statement is true, but some other people here know that better than me…
Hi @Garbage_Collector are you sure these list is equal, however you could try list map the list so it follow your elements
Yes they are equal, below is a better screenshot of what im trying to do:
It looks like you have 165 elements and 168 parameters/values. That doesn’t seem like a correctly matched structure. Your parameters/values also seem to be lists of single items which again says that you have unnecessary structure somewhere.
It certainly does seem like there are easier ways to go about this. It looks like you’re using a dictionary, which should mean that you can use a flattened list (somewhere) since all elements would have their own values from the dictionary. Without seeing the rest of your graph we can’t really help with where to clean things up.
Also, list levels will not magically fix every replication structure. Some combinations of structures just aren’t possible based on intended input structures for nodes. Sometimes you have to do some more list management to make things possible.
1 Like
The parameter count is different compared to the element count because what parameters i want to set is dependant on the family im using. So for some, i will only set ‘link id’ and for some i also have to alter the diameter.
As you and @bvs1982 suggested,i have flattened the list of dicts since i dont need to keep that structure and can simply walk through the list of dicts. This has solved the issue, so thanks to both of you