Commit 93138970 authored by Anton Akhmerov's avatar Anton Akhmerov
Browse files

update the pillow array API

parent 288febc6
Pipeline #84207 passed with stage
in 9 minutes and 58 seconds
......@@ -203,7 +203,7 @@ JET_TREE = cKDTree(jet_pts)
def points_near_jet(img, r=0.2, plot=False):
# Represent image as float so we can perform division
img = np.array(img, dtype="float").reshape(-1, 3)
img = np.array(img).astype(float).reshape(-1, 3)
img /= 255 # Map colors into a unit cube.
img_tree = cKDTree(img, balanced_tree=False, compact_nodes=False)
pts = [res for neighs in JET_TREE.query_ball_tree(img_tree, r) for res in neighs]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment