Skip to content

Commit 8ba117b

Browse files
committed
Fix straight gradient resampling
1 parent aafde42 commit 8ba117b

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

pyresample/gradient/_gradient_search.pyx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,15 +119,16 @@ cpdef one_step_gradient_search(const DTYPE_t [:, :, :] data,
119119

120120

121121
# output image array --> needs to be (lines, pixels) --> y,x
122-
cdef DTYPE_t [:, :, :] image = np.full([z_size, y_size, x_size], np.nan, dtype=DTYPE)
122+
image = np.full([z_size, y_size, x_size], np.nan, dtype=DTYPE)
123+
cdef DTYPE_t [:, :, :] image_view = image
123124
cdef size_t [:] elements = np.arange(x_size, dtype=np.uintp)
124125
with nogil:
125126
one_step_gradient_search_no_gil(data,
126127
src_x, src_y,
127128
xl, xp, yl, yp,
128129
dst_x, dst_y,
129130
x_size, y_size,
130-
fun, image,
131+
fun, image_view,
131132
elements)
132133
# return the output image
133134
return image

0 commit comments

Comments
 (0)