from pylab import *from scipy.ndimage import measurementsL = 100pv = [0.2,0.3,0.4,0.5,0.6,0.7]z = rand(L,L)for i in range(len(pv)): p = pv[i] m = z<p lw, num = measurements.label(m) area = measurements.sum(m, lw, index=arange(lw.max() + 1)) areaImg = area[lw] subplot(2,3,i+1) tit = 'p='+str(p) imshow(areaImg, origin='lower') title(tit) axis()I'm trying to run this code in vscode but it is showing this thing on terminal
DeprecationWarning: Please import label from the scipy.ndimage namespace; the scipy.ndimage.measurements namespace is deprecated and will be removed in SciPy 2.0.0.lw, num = measurements.label(m)
DeprecationWarning: Please import sum from the scipy.ndimage namespace; the scipy.ndimage.measurements namespace is deprecated and will be removed in SciPy 2.0.0.area = measurements.sum(m, lw, index=arange(lw.max() + 1))
i actually new and dont know how to import label and sum.