digitalmars.D.announce - Numpy Random Number Generators
- dsimcha <dsimcha yahoo.com> Apr 30 2009
- Andrei Alexandrescu <SeeWebsiteForEmail erdani.org> Apr 30 2009
- dsimcha <dsimcha yahoo.com> May 01 2009
I've ported a large portion of the Numpy random number generation library to D. (I excluded the uniform random number generators because Phobos and Tango already have good implementations of these, and a few distributions because they were obscure and hard to test properly. I may add the obscure probability distributions later.) The results appear pretty good (I added unit tests that make sure the results are sane while I was at it). The module is licensed under the BSD license. The code is available at: http://dsource.org/projects/dstats/browser/trunk/random.d Docs are at http://svn.dsource.org/projects/dstats/docs/random.html although there's not much there. If you understand the probability distribution you're trying to sample from, it's pretty self-explanatory. If not, a little bit of ddoc isn't going to help, and Wikipedia is probably a better choice.
Apr 30 2009
dsimcha wrote:I've ported a large portion of the Numpy random number generation library to D. (I excluded the uniform random number generators because Phobos and Tango already have good implementations of these, and a few distributions because they were obscure and hard to test properly. I may add the obscure probability distributions later.) The results appear pretty good (I added unit tests that make sure the results are sane while I was at it). The module is licensed under the BSD license. The code is available at: http://dsource.org/projects/dstats/browser/trunk/random.d Docs are at http://svn.dsource.org/projects/dstats/docs/random.html although there's not much there. If you understand the probability distribution you're trying to sample from, it's pretty self-explanatory. If not, a little bit of ddoc isn't going to help, and Wikipedia is probably a better choice.
These look great. Could I convince you to contribute them to Phobos? Andrei
Apr 30 2009
== Quote from Andrei Alexandrescu (SeeWebsiteForEmail erdani.org)'s articledsimcha wrote:I've ported a large portion of the Numpy random number generation library to D. (I excluded the uniform random number generators because Phobos and Tango already have good implementations of these, and a few distributions because they were obscure and hard to test properly. I may add the obscure probability distributions later.) The results appear pretty good (I added unit tests that make sure the results are sane while I was at it). The module is licensed under the BSD license. The code is available at: http://dsource.org/projects/dstats/browser/trunk/random.d Docs are at http://svn.dsource.org/projects/dstats/docs/random.html although there's not much there. If you understand the probability distribution you're trying to sample from, it's pretty self-explanatory. If not, a little bit of ddoc isn't going to help, and Wikipedia is probably a better choice.
Andrei
I would certainly be willing to grant permission for these to be included in Phobos. The only problem is the original code that I ported is BSD licensed, meaning you have to include all the relevant disclaimers. I place no additional restrictions on it, but for Phobos, the BSD license's requirements might be too restrictive.
May 01 2009








dsimcha <dsimcha yahoo.com>