Skip to content

Commit

Permalink
An attempt (#3) to figure out failing tests on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
mcara committed Dec 10, 2024
1 parent 1b2cd84 commit b2c4529
Showing 1 changed file with 21 additions and 9 deletions.
30 changes: 21 additions & 9 deletions src/cdrizzleapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,6 @@ process_array_list(PyObject *list, integer_t *nx, integer_t *ny,
PyArrayObject *arr = NULL;
int i, at_least_one;

// *nx = -1;
// *ny = -1;
*arrays = NULL;
*nmax = 0;
if (n_none) {
Expand Down Expand Up @@ -93,6 +91,13 @@ process_array_list(PyObject *list, integer_t *nx, integer_t *ny,
*nx = (int)ndim[1];
*ny = (int)ndim[0];
*arrays = arr_list;
for (int i = 0; i < (*nmax); ++i) {
if (!(*arrays)[i]) {
driz_error_set(error, PyExc_ValueError,
"Some of the 'out2_list' arrays are NULL!");
goto _exit_on_err;
}
}
return 0;

} else if (!PyList_Check(list) && !PyTuple_Check(list)) {
Expand Down Expand Up @@ -459,13 +464,6 @@ tdriz(PyObject *obj UNUSED_PARAM, PyObject *args, PyObject *keywords) {
"the number of 'input2' arrays.");
goto _exit;
}
for (int i = 0; i < nsq_arr_out; ++i) {
if (!out2_list[i]) {
driz_error_set_message(
&error, "Some of the 'out2_list' arrays are NULL!");
goto _exit;
}
}
}
} else if (nsq_args == 1) {
driz_error_set_message(
Expand Down Expand Up @@ -555,6 +553,20 @@ tdriz(PyObject *obj UNUSED_PARAM, PyObject *args, PyObject *keywords) {
p.ndata2 = nsq_arr;
p.error = &error;

printf("\n\np.ndata2: %d, nsq_arr: %d, nsq_arr_out: %d\n", p.ndata2,
nsq_arr, nsq_arr_out);
fflush(stdout);

for (int i = 0; i < p.ndata2; ++i) {
printf("p.output_data2[%d]=%p\n", i, p.output_data2[i]);
fflush(stdout);
if (!p.output_data2[i]) {
driz_error_set(&error, PyExc_ValueError,
"Some of the 'out2_list' arrays are NULL!");
goto _exit;
}
}

if (driz_error_check(&error, "xmin must be >= 0", p.xmin >= 0)) {
goto _exit;
}
Expand Down

0 comments on commit b2c4529

Please sign in to comment.