My code calls image_match.signature_database_base.get_words directly. I am getting this failure during pytest unit tests:
words = np.zeros((N, k)).astype('int8')
for i, pos in enumerate(word_positions):
if pos + k <= array.shape[0]:
words[i] = array[pos:pos+k]
else:
temp = array[pos:].copy()
> temp.resize(k)
E ValueError: cannot resize an array that references or is referenced
E by another array in this way.
E Use the np.resize function or refcheck=False
venv/lib/python3.8/site-packages/image_match/signature_database_base.py:407: ValueError
My code calls
image_match.signature_database_base.get_words
directly. I am getting this failure during pytest unit tests:I have solved this locally by simply adding
refcheck=False
to the resize line. However, https://stackoverflow.com/questions/20730366/numpy-resize-method seems to suggest that using a temp buffer in this way may not be appropriate.