Skip to content

Commit

Permalink
Merge pull request #771 from danforthcenter/nump_int_bool_compatibility
Browse files Browse the repository at this point in the history
numpy is deprecating `np.int` and `np.bool`
  • Loading branch information
nfahlgren authored May 11, 2021
2 parents daee7ac + 4fea8ac commit f100b41
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions plantcv/plantcv/cluster_contours.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,13 @@ def cluster_contours(img, roi_objects, roi_obj_hierarchy, nrow=1, ncol=1, show_g
rbreaks = [0, iy]
else:
rstep = np.rint(iy / nrow)
rstep1 = np.int(rstep)
rstep1 = int(rstep)
rbreaks = range(0, iy, rstep1)
if ncol == 1:
cbreaks = [0, ix]
else:
cstep = np.rint(ix / ncol)
cstep1 = np.int(cstep)
cstep1 = int(cstep)
cbreaks = range(0, ix, cstep1)

# categorize what bin the center of mass of each contour
Expand Down
2 changes: 1 addition & 1 deletion plantcv/plantcv/visualize/pseudocolor.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def pseudocolor(gray_img, obj=None, mask=None, cmap=None, background="image", mi
value=(0, 0, 0))

# Apply the mask
masked_img = np.ma.array(gray_img1, mask=~mask.astype(np.bool))
masked_img = np.ma.array(gray_img1, mask=~mask.astype(bool))

# Set the background color or type
if background.upper() == "BLACK":
Expand Down

0 comments on commit f100b41

Please sign in to comment.