Skip to content

Commit

Permalink
Defaults to 0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
dgoeries committed Feb 18, 2020
1 parent 42bb134 commit 3b93f98
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lttbc.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,13 +68,13 @@ static PyObject* downsample(PyObject *self, PyObject *args) {
sampled_x_data[sampled_index] = x[a];
}
else {
sampled_x_data[sampled_index] = 0;
sampled_x_data[sampled_index] = 0.0;
}
if (npy_isfinite(y[a])) {
sampled_y_data[sampled_index] = y[a];
}
else {
sampled_y_data[sampled_index] = 0;
sampled_y_data[sampled_index] = 0.0;
}
sampled_index++;
int i;
Expand Down Expand Up @@ -131,13 +131,13 @@ static PyObject* downsample(PyObject *self, PyObject *args) {
sampled_x_data[sampled_index] = last_a_x;
}
else {
sampled_x_data[sampled_index] = 0;
sampled_x_data[sampled_index] = 0.0;
}
if (npy_isfinite(last_a_y)) {
sampled_y_data[sampled_index] = last_a_y;
}
else {
sampled_y_data[sampled_index] = 0;
sampled_y_data[sampled_index] = 0.0;
}

// Provide our return value
Expand Down

0 comments on commit 3b93f98

Please sign in to comment.