Missing control of the input vectors
pajola opened this issue · comments
I was running the function imd_sample and I've noticed that the function returns a result even when the arrays are not 1D.
The arrays don't actually need to be 1D, since they're interpreted as a bunch of samples that are converted into a histogram; the behavior for multidimensional arrays is inherited from np.histogram
. We should remove the "1D" description from the docstring.
But the function of numpy histogram is flatting the array, isn't this a problem?
https://docs.scipy.org/doc/numpy/reference/generated/numpy.histogram.html
No, it isn't a problem. The purpose of the function is to compute a histogram on two sets of samples and then measure the distance between the histograms with the EMD, so the shape of the array that the samples are stored in should not matter.