From 9753a861f33fdbf6838ae34d7df7628e526c256e Mon Sep 17 00:00:00 2001 From: Pablo Prietz Date: Wed, 24 Jun 2020 14:49:41 +0200 Subject: [PATCH] Fix MutableBisector.insert MutableBisector calls numpy.insert on self.data. The documentation states that it will attempt to convert the insertion value to the dtype of the array. https://numpy.org/doc/1.18/reference/generated/numpy.insert.html This currently fails for post-hoc annotations and head pose tracking as self.data is not an object-array. --- pupil_src/shared_modules/player_methods.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pupil_src/shared_modules/player_methods.py b/pupil_src/shared_modules/player_methods.py index 5e3401993d..eb4800a64f 100644 --- a/pupil_src/shared_modules/player_methods.py +++ b/pupil_src/shared_modules/player_methods.py @@ -48,7 +48,7 @@ def __init__(self, data=(), data_ts=()): ) ) elif not len(data): - self.data = np.array([]) + self.data = np.array([], dtype=object) self.data_ts = np.array([]) self.sorted_idc = [] else: