-
Notifications
You must be signed in to change notification settings - Fork 233
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
List Item Insert - negative indexing #4578
Comments
sverchok/nodes/list_struct/item_insert.py Lines 107 to 110 in 94b5cf3
|
The approach is not efficient for replace mode. Should be |
sverchok/nodes/list_struct/item_insert.py Lines 107 to 112 in e1be475
|
Or like this =). But this, I think, does not give big performance improvement, at least compare to moving from if self.replace:
for ind, i in zip(*params):
idx = ind % len(data) # translate to positive idx
data_out[idx] = i
else:
for ind, i in zip(*params):
idx = ind % len(data) # translate to positive idx
data_out.insert(idx, i) |
hehe .. or that. commit if you wish :) |
It seems another bug was produced by the fix. I guess next string is to blame sverchok/nodes/list_struct/item_insert.py Line 108 in 510c1e3
|
Problem statement
It looks like a bug that
-1
index does not refer to the last element.#3827
The text was updated successfully, but these errors were encountered: