[SofaPython3] Remove -at-best- the use of this infamous string conver…#45
[SofaPython3] Remove -at-best- the use of this infamous string conver…#45damienmarchal wants to merge 3 commits intosofa-framework:masterfrom
Conversation
…sion while creating an object.
6fdc309 to
24c22d3
Compare
…h invalid argument. (this was the previous behavior)
The PR is breaking existing code. But the previously working code was, despite being conveniant was not valid and it was using a "flat" array as a multi-dimensionnal structure. It was not noticed before because the lists were converted into a 1D array then into a big string. Two options were possibles: a) not allowing this kind of code (using a 1D array to fill a 2D structure) b) implement kind of de-flattening a python lists into the corresponding multidimmensional matrix For the simplicity I choose option (a), so I updated the tests to use the 'right' syntax.
|
I see this is not active anymore since December, should we close it @damienmarchal ? |
|
No it is worth keeping it. |
|
I think that with the help of PR #184 we now have the proper way to integrate this breaking change in Sofa. Despite the change is breaking a core feature... it will be activate no demand. |
|
Hello everyone ! Under the impulse of Damien, after having again compatibility problems with numpy types (recent version) and Sofa, I would like to reactivate this post. From what I understood, the problem comes from the string conversion of python types to recast them later into Sofa types. While it is pretty easy to downgrade the version of numpy and have compatible datatypes (by the way, indicating the version to use in the installation guidelines would be great), I think it would be cleaner to improve this string conversion to accommodate more recent python types versions. Thank you a lot for your work ! |
|
Thanks for bringing it back @peyronq1 |
|
So, I've just tried to track the reason of the incompatibility with numpy 2. It seems indeed that this PR might fix this. |
|
Superseded by #511 |
…sion while creating an object.