From afda302d08eb5a63c0cf9123f12f84cf9a748da6 Mon Sep 17 00:00:00 2001 From: Shukai Ni Date: Mon, 4 Jul 2022 02:01:19 -0700 Subject: [PATCH] Fixed random location range --- wordcloud/query_integral_image.pyx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wordcloud/query_integral_image.pyx b/wordcloud/query_integral_image.pyx index e183fce38..0eadc8f57 100644 --- a/wordcloud/query_integral_image.pyx +++ b/wordcloud/query_integral_image.pyx @@ -23,7 +23,7 @@ def query_integral_image(unsigned int[:,:] integral_image, int size_x, int # no room left return None # pick a location at random - cdef int goal = random_state.randint(0, hits) + cdef int goal = random_state.randint(1, hits) hits = 0 for i in xrange(x - size_x): for j in xrange(y - size_y):