Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

maybe you already fail at numpy -- np.histogram returns a tuple()

maybe you already fail at numpy -- np.histogram returns a tuple()tuple

maybe you the failure is already fail at in your numpy -- np.histogram code: np.histogram() returns a tupletuple, you have to use it like:

hist, edges = np.histogram(data)

(you're passing the whole (hist,edges) tuple into compareHist())

again, please carefully read docs, before guessing a problem.

next, numpy's histograms are int64, so you will need to convert them to float32 before you can compare those

the failure is already in your numpy code: np.histogram() returns a tuple, you have to use it like:

hist, edges = np.histogram(data)

(you're passing the whole (hist,edges) tuple into compareHist())

again, please carefully read docs, before guessing a problem.

next, numpy's histograms are int64, so you will need to convert them to float32 before you can compare those