Closed linxxcad closed 9 months ago
Hi @linxxcad,
I think one approach could be to use dr.ravel/dr.unravel
# Flatten the input
z = Float(dr.ravel([A,B,C]))
# Use row-major ordering to repackage the Array3f
D = dr.unravel(Array3f, z, order='C')
And yes, this will still be differentiable
你好@linxxcad,
我认为一种方法可能是使用
dr.ravel/dr.unravel
# Flatten the input z = Float(dr.ravel([A,B,C])) # Use row-major ordering to repackage the Array3f D = dr.unravel(Array3f, z, order='C')
是的,这仍然是可微的
Thanks for your help!
I want to realize merge multiple arrays in type of Array3f.
How to get
D=Array3f( [ [0,1,2] , [3,4,5] , [6,7,8] ])
It can be done in numpy by append or stack. Is this operation differentiable?
I would appreciate it if anyone could help me