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

update the pillow array API

parent 288febc6
Pipeline #117690 failed with stage
in 5 minutes and 47 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]
Supports Markdown
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