-
Notifications
You must be signed in to change notification settings - Fork 165
Open
Description
The computation order of Jacobian in Chumpy is nondeterministic. This in cases leads to different optimization results from run to run, since the numerical approximation errors are dependent on the computation order. Specifically, the function dr_wrt() in class Ch has the following code:
for k in set(self.dterms).intersection(propnames.union(set(self.__dict__.keys()))):
...The set is an unordered container in python, and what's even worse for science computation is that its access order is nondeterministic. A quick fix to this could be adding a call to sorted():
for k in sorted(set(self.dterms).intersection(propnames.union(set(self.__dict__.keys())))):
...Metadata
Metadata
Assignees
Labels
No labels