Hi, > i have been using the function for the pdf of the dirichlet > distribution in PyGSL. > > the function works correctly on most values, but appears to return > nan when it shouldn't on more extreme cases. for example, the pdf > evaluated on the set of values [0, 0, 1] with parameter settings > [1/3, 1/3, 1/3] returns NaN, even though [0, 0, 1] is a perfectly > fine value for the dirichlet pdf that should have non-zero > probability. this is true for both the dirichlet_pdf and > dirichlet_lnpdf (log of pdf) functions. > > in python notation, this is: > > dirichlet_pdf([0, 0, 1], [1/3., 1/3., 1/3.]) (evaluates to NaN) > dirichlet_lnpdf([0, 0, 1], [1/3., 1/3., 1/3.]) (evaluates to NaN as > well) > > any idea why this is or how i can fix it?
Does the same issue occur when using GSL directly (from C)? If so, it would be the best to report it to the GSL mailing list. Greetings, Jochen -- Einigkeit und Recht und Freiheit http://www.Jochen-Kuepper.de Liberté, Égalité, Fraternité GnuPG key: CC1B0B4D Sex, drugs and rock-n-roll ------------------------------------------------------------------------------ Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge _______________________________________________ pygsl-discuss mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/pygsl-discuss
