Replace deprecated `normed` with `density` in numpy.histogram()
The normed keyword argument has been removed from np.histogram, np.histogram2d, and np.histogramdd. Use density instead. If normed was passed by position, density is now used. Here is the change log: https://numpy.org/devdocs/release/2.24.1-notes.html#expired-deprecationsLT1AB
parent
735fba0bdb
commit
3322c29698
|
|
@ -120,7 +120,7 @@ def runESD(self, debugPlot=True):
|
|||
meanval = np.mean(val)
|
||||
stdval = np.std(val)
|
||||
|
||||
hist, bins = np.histogram(val, 50, normed=1)
|
||||
hist, bins = np.histogram(val, 50, density=True)
|
||||
center = 0.5*(bins[:-1] + bins[1:])
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -152,7 +152,7 @@ def runRangeCoreg(self, debugPlot=True):
|
|||
meanval = np.mean(val)
|
||||
stdval = np.std(val)
|
||||
|
||||
hist, bins = np.histogram(val, 50, normed=1)
|
||||
hist, bins = np.histogram(val, 50, density=True)
|
||||
center = 0.5*(bins[:-1] + bins[1:])
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -141,7 +141,7 @@ def main(iargs=None):
|
|||
meanval = np.mean(val)
|
||||
stdval = np.std(val)
|
||||
|
||||
hist, bins = np.histogram(val, 50, normed=1)
|
||||
hist, bins = np.histogram(val, 50, density=True)
|
||||
center = 0.5*(bins[:-1] + bins[1:])
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -205,7 +205,7 @@ def main(iargs=None):
|
|||
meanval = meanval * referenceTop.bursts[0].rangePixelSize
|
||||
stdval = stdval * referenceTop.bursts[0].rangePixelSize
|
||||
|
||||
hist, bins = np.histogram(val, 50, normed=1)
|
||||
hist, bins = np.histogram(val, 50, density=True)
|
||||
center = 0.5*(bins[:-1] + bins[1:])
|
||||
|
||||
outputDir = os.path.dirname(inps.output)
|
||||
|
|
|
|||
Loading…
Reference in New Issue