kailaix / ADCME.jl

Automatic Differentiation Library for Computational and Mathematical Engineering
https://kailaix.github.io/ADCME.jl/latest/
MIT License
286 stars 57 forks source link

Sparse matrix indexing is not correct #40

Closed kailaix closed 4 years ago

kailaix commented 4 years ago
idof = [false;true]
M = spdiag(constant(ones(2)))
M[idof, idof] # should be 1 x 1, but the result is 2 x 2