Open FLOWERCLOUD opened 6 years ago
It apparently works if you use the vstack, hstack, concatenate or reshape functions, e.g. one possibility with concatenate + reshape would be:
a = ch.array(5)
Rx = ch.concatenate([
1, 0, 0,
0, ch.cos(a), -ch.sin(a),
0, ch.sin(a), ch.cos(a)]).reshape(3, 3)
that works well ,thank you
for example: a = ch.array(5)
Rx = ch.array([[1, 0, 0], [0, ch.cos(a), -ch.sin(a)], [0, ch.sin(a), ch.cos(a)]])
but when I change a[0] ,the value in Rx will not change . It seems that my way of array assembly will break the forward-mode So how can I assemble a new array and still hold the forward mode.