Uh oh!
There was an error while loading. Please reload this page.
[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 into
Conversation
Uh oh!
There was an error while loading. Please reload this page.
…sion while creating an object.
6fdc309 to
24c22d3Compare…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.
hugtalbot
commented
May 12, 2021
I see this is not active anymore since December, should we close it @damienmarchal ? |
damienmarchal
commented
May 12, 2021
No it is worth keeping it. |
damienmarchal
commented
Sep 20, 2021
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. |
peyronq1
commented
Apr 1, 2025
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 ! |
hugtalbot
commented
Apr 1, 2025
Thanks for bringing it back @peyronq1 |
bakpaul
commented
Jul 4, 2025
So, I've just tried to track the reason of the incompatibility with numpy 2. It seems indeed that this PR might fix this. |
bakpaul
commented
Jul 7, 2025
Superseded by #511 |
…sion while creating an object.