test_user_struct.py
Go to the documentation of this file.
1 import numpy as np
2 from user_struct import *
3 
4 
5 x = np.ones(3)
6 y = np.ones(4)
7 ms = MyStruct(x, y)
8 print(ms.x)
9 print(ms.y)
10 
11 ms.x[0] = 0.0
12 
13 ms.x = x # ok
14 assert np.allclose(ms.x, x)
15 
16 ms.y[:] = y
17 ms.y = y # segfault
void print(const Tensor &tensor)
Definition: tensor.cpp:35


eigenpy
Author(s): Justin Carpentier, Nicolas Mansard
autogenerated on Fri Jun 2 2023 02:10:26