-
Notifications
You must be signed in to change notification settings - Fork 45
Open
Description
In the ida.pyx file constraints_idx is to be specified as an array
odes/scikits/odes/sundials/ida.pyx
Lines 1025 to 1031 in 57466a9
| 'constraints_idx': | |
| Values: numpy vector or None (= default) | |
| Description: | |
| Constraint the individual variables. The variables are | |
| denoted by the position (index) in the residual vector. | |
| All these indexes are/have to be specified in this | |
| 'constraints_idx' array. |
However, range cannot be taken of a array.
odes/scikits/odes/sundials/ida.pyx
Lines 1747 to 1752 in 57466a9
| if not constraints_type is None: | |
| if not constraints_idx is None: | |
| constraints_vars = np.zeros(N, DTYPE) | |
| for idx in range(constraints_idx): | |
| constraints_vars[constraints_idx[idx]] = constraints_type[idx] | |
| else: |
This line can be changed to this to get the indexes of the constraints
for i, idx in enumerate(constraints_idx):
constraints_vars[idx] = constraints_type[i]Metadata
Metadata
Assignees
Labels
No labels