Skip to content

Commit 78c779a

Browse files
committed
add dtype=object to ragged arrays to prevent deprecation warning
1 parent 1ba13fb commit 78c779a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pysift.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def generateGaussianImages(image, num_octaves, gaussian_kernels):
7777
gaussian_images.append(gaussian_images_in_octave)
7878
octave_base = gaussian_images_in_octave[-3]
7979
image = resize(octave_base, (int(octave_base.shape[1] / 2), int(octave_base.shape[0] / 2)), interpolation=INTER_NEAREST)
80-
return array(gaussian_images)
80+
return array(gaussian_images, dtype=object)
8181

8282
def generateDoGImages(gaussian_images):
8383
"""Generate Difference-of-Gaussians image pyramid
@@ -90,7 +90,7 @@ def generateDoGImages(gaussian_images):
9090
for first_image, second_image in zip(gaussian_images_in_octave, gaussian_images_in_octave[1:]):
9191
dog_images_in_octave.append(subtract(second_image, first_image)) # ordinary subtraction will not work because the images are unsigned integers
9292
dog_images.append(dog_images_in_octave)
93-
return array(dog_images)
93+
return array(dog_images, dtype=object)
9494

9595
###############################
9696
# Scale-space extrema related #

0 commit comments

Comments
 (0)