1

I would like to use the C++11 <random> header in Cython code. I notice here that it is not included by default with Cython: https://github.com/cython/cython/tree/master/Cython/Includes/libcpp

It's just a bit overwhelming to get the pxd and pyx files figured out and get a working setup file to install and use them.

Could you please help me figure out a simple example? Thank you!

TJB
  • 3,493
  • 4
  • 23
  • 20
  • See https://scicomp.stackexchange.com/a/4771 – John Zwinck Oct 15 '17 at 02:17
  • 2
    Follow the examples for the other C++ standard library module wrappers that are included with cython. Once you're done you can make a pull request to include your wrapper with upstream cython :) – ngoldbaum Oct 15 '17 at 03:47
  • 1
    Possible duplicate of [Canonical way to generate random numbers in Cython](https://stackoverflow.com/questions/40976880/canonical-way-to-generate-random-numbers-in-cython) – DavidW Oct 15 '17 at 08:42
  • I know the question I've flagged as a duplicate isn't quite the same as yours, but I believe the answer tells you what you want to know. If this isn't the case then I'm happy to withdraw the flag – DavidW Oct 15 '17 at 08:43

0 Answers0