Commit c5b0fb1
Use built in method numpy.set_printoptions in addObject/addChild methods to enable numpy 2 (#518)
* Use set_printoptions(legacy=True) in node binfing to force usage of legacy repr for numpy objects. This is ocmpatible with numpy 1
* Patch addChild
* Add RAII mechanism to make sure numpy is put back its initial state
* Add [[maybe_unused]]
Co-authored-by: Frederick Roy <fredroy@users.noreply.github.com>
---------
Co-authored-by: Hugo <hugo.talbot@sofa-framework.org>
Co-authored-by: Frederick Roy <fredroy@users.noreply.github.com>1 parent 1219430 commit c5b0fb1
1 file changed
Lines changed: 44 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
235 | 235 | | |
236 | 236 | | |
237 | 237 | | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
238 | 273 | | |
239 | 274 | | |
240 | 275 | | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
241 | 279 | | |
242 | 280 | | |
243 | 281 | | |
| |||
292 | 330 | | |
293 | 331 | | |
294 | 332 | | |
| 333 | + | |
| 334 | + | |
295 | 335 | | |
296 | 336 | | |
297 | 337 | | |
| |||
361 | 401 | | |
362 | 402 | | |
363 | 403 | | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
364 | 407 | | |
365 | 408 | | |
366 | 409 | | |
| |||
379 | 422 | | |
380 | 423 | | |
381 | 424 | | |
| 425 | + | |
382 | 426 | | |
383 | 427 | | |
384 | 428 | | |
| |||
0 commit comments