summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorDavid Plowman <david.plowman@raspberrypi.com>2021-07-21 12:52:18 +0100
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-08-03 10:54:26 +0300
commita792512496abbf756354cecc7b564e9733ea3fda (patch)
tree405702e9bf03e8ede544cfa3834f6ec74ab0c100 /utils
parente9288e2ee5aa6c1637212ca4b51cd0a951b7bd05 (diff)
utils: raspberrypi: ctt: Fix namespace for sklearn NearestCentroid function
Starting in version 0.22, the NearestCentroid function is only available in the sklearn.neighbors namespace, when it was previously available in both the sklearn.neighbors.nearest_centroid and sklearn.neighbors namespaces. Use sklearn.neighbors as it works on all versions of sklearn. Signed-off-by: David Plowman <david.plowman@raspberrypi.com> Reviewed-by: Naushir Patuck <naush@raspberrypi.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'utils')
-rw-r--r--utils/raspberrypi/ctt/ctt_tools.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/utils/raspberrypi/ctt/ctt_tools.py b/utils/raspberrypi/ctt/ctt_tools.py
index 48e0aac2..8728ff16 100644
--- a/utils/raspberrypi/ctt/ctt_tools.py
+++ b/utils/raspberrypi/ctt/ctt_tools.py
@@ -14,7 +14,7 @@ import imutils
import sys
import matplotlib.pyplot as plt
from sklearn import cluster as cluster
-from sklearn.neighbors.nearest_centroid import NearestCentroid as get_centroids
+from sklearn.neighbors import NearestCentroid as get_centroids
"""
This file contains some useful tools, the details of which aren't important to