natalia-mihokova / similarity

Statistical measures of similarity between one-dimensional distributions.
0 stars 0 forks source link

(analytical.py) Poisson function - integers #1

Open natalia-mihokova opened 2 years ago

natalia-mihokova commented 2 years ago

The Poisson function only accepts xvals to be integers (k has to belong to Natural numbers), which is not ensure. It doesn't work.

michael-petersen commented 2 years ago

I think this is a case where we should check whether the array is integer values: something like, when the user first calls a Poisson distribution, check that xvals[0] is an integer. Perhaps something like

if !(isinstance(xvals[[0], int)):
  print("similarity.analytical: Poisson distribution can only be evaluated for integer xvals.")
  return