Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyoptsparse/pyNSGA2/source/allocate.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ void allocate_memory_ind (individual *ind, Global global)
if (global.nbin != 0)
{
ind->xbin = (double *)malloc(global.nbin*sizeof(double));
ind->gene = (int **)malloc(global.nbin*sizeof(int));
ind->gene = (int **)malloc(global.nbin*sizeof(int *));
for (j=0; j<global.nbin; j++)
{
ind->gene[j] = (int *)malloc(global.nbits[j]*sizeof(int));
Expand Down
4 changes: 2 additions & 2 deletions pyoptsparse/pyNSGA2/source/crowddist.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ void assign_crowding_distance_list (population *pop, list *lst, int front_size,
pop->ind[lst->child->index].crowd_dist = INF;
return;
}
obj_array = (int **)malloc(global.nobj*sizeof(int));
obj_array = (int **)malloc(global.nobj*sizeof(int *));
dist = (int *)malloc(front_size*sizeof(int));
for (i=0; i<global.nobj; i++)
{
Expand Down Expand Up @@ -66,7 +66,7 @@ void assign_crowding_distance_indices (population *pop, int c1, int c2, Global g
pop->ind[c2].crowd_dist = INF;
return;
}
obj_array = (int **)malloc(global.nobj*sizeof(int));
obj_array = (int **)malloc(global.nobj*sizeof(int *));
dist = (int *)malloc(front_size*sizeof(int));
for (i=0; i<global.nobj; i++)
{
Expand Down
2 changes: 1 addition & 1 deletion tests/test_nsga2_multi_objective.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def setup_optProb(self, n_obj):
@parameterized.expand(
[
(1,),
# (2,), # skipping flaky multi-objective test
(2,),
]
)
def test_opt(self, n_obj):
Expand Down
Loading