Open lazarusA opened 1 year ago
That error usually occurs (also in your case as the stack trace suggests) if you try to update an array of non-dual numbers with dual numbers. You should ensure that the array that you write to is an array of dual numbers.
Thanks, I see. Is there a way to define rules for this kind of matrices. Or, it needs to be done explicitly for each one of them ?
I'm not sure what you mean by rules here. As in other non-ForwardDiff Julia code, you just have to ensure that the arrays you create can store the results of your computations. E.g., by computing a result first, using map
, or using heuristics based on the involved types and operations.
I'm running a set of functions, at the moment I don't have a proper MWE (and not sure how exactly get the same error), but I would like to know if this is something familiar to some of you and how I could start debugging the issue.
This is part of the error trace that I can share at the moment: