You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since the memory is held by the C++, resizing operations cannot be performed on c++-owned arrays, even in writeable contexts.
The only clean way is to implement the basic resizing methods in Sofa.Core.DataContainer such as:
resize
push_back / front
pop_back / front
insert / erase
...
And also, we want to reimplement setattr(s = "value") in DataContainer to be able to reallocate & copy lists from python to be able to do stuff like:
myComponent.myVector.value= [alistwithdifferentshape] # won't work
Meanwhile, workaround hack is to retrieve a Sofa.Core.Data instead of DataContainer to use its setattr method:
myComponent.getData("myVector").value= [arraywithdifferentshape] # works
Activity