Python Forum

Full Version: histogram error
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I need to make a histogram of the log10 of a variable r. So I made variable a = np.log10®, and tried to do:

plt.hist(a, fill = False)

it then gave the error " range parameter must be finite."

PLEASE HELP ME!!
thanks so much
the way you define a, it is the function np,log10, not a value:
>>> import numpy as np
>>> a = np.log10
>>> type(a)
<class 'numpy.ufunc'>
>>>