Commit df60770
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 441731d commit df60770
1 file changed
+44
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
234 | 234 | | |
235 | 235 | | |
236 | 236 | | |
| 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 | + | |
237 | 272 | | |
238 | 273 | | |
239 | 274 | | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
240 | 278 | | |
241 | 279 | | |
242 | 280 | | |
| |||
291 | 329 | | |
292 | 330 | | |
293 | 331 | | |
| 332 | + | |
| 333 | + | |
294 | 334 | | |
295 | 335 | | |
296 | 336 | | |
| |||
360 | 400 | | |
361 | 401 | | |
362 | 402 | | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
363 | 406 | | |
364 | 407 | | |
365 | 408 | | |
| |||
378 | 421 | | |
379 | 422 | | |
380 | 423 | | |
| 424 | + | |
381 | 425 | | |
382 | 426 | | |
383 | 427 | | |
| |||
0 commit comments