¡@

Home 

python Programming Glossary: log2

How to plot an image with non-linear y-axis with Matplotlib using imshow?

http://stackoverflow.com/questions/1679126/how-to-plot-an-image-with-non-linear-y-axis-with-matplotlib-using-imshow

like this one class arr object @staticmethod def mylog2 x lx 0 while x 1 x 1 lx 1 return lx def __init__ self array.. array def __getitem__ self index return self.array arr.mylog2 index 1 def __len__ self return 1 len self.array Basically it.. the first coordinate of an array or list with the mylog2 function that you can transform as you wish it's home made as..

Howto bin series of float values into histogram in Python?

http://stackoverflow.com/questions/1721273/howto-bin-series-of-float-values-into-histogram-in-python

way to do it # usr bin env python import fileinput math log2 math.log 2 def getBin x return int math.log x 1 log2 diffCounts.. math log2 math.log 2 def getBin x return int math.log x 1 log2 diffCounts 0 5 for line in fileinput.input words line.split..

How to identify non-photograph or 'uninteresting' images using Python Imaging Library (PIL)

http://stackoverflow.com/questions/5011505/how-to-identify-non-photograph-or-uninteresting-images-using-python-imaging-li

math import log def get_histogram_dispersion histogram log2 lambda x log x log 2 total len histogram counts for item in.. item 1 ent 0 for i in counts p float counts i total ent p log2 p return ent log2 1 ent im Image.open 'test.png' h im.histogram.. i in counts p float counts i total ent p log2 p return ent log2 1 ent im Image.open 'test.png' h im.histogram print get_histogram_dispersion..

Relationship between scipy and numpy

http://stackoverflow.com/questions/6200910/relationship-between-scipy-and-numpy

appear to be a ufunc. The same can be said about log log2 and logn but not about log1p 2 . On the other hand numpy.exp.. that module overlays the base numpy ufuncs for sqrt log log2 logn log10 power arccos arcsin and arctanh. That explains the..