Skip to content

Investigate implementing rand/randn in pure Cython #1264

@mstimberg

Description

@mstimberg

The current Cython implementation for Cython (i.e. rand() and randn()) jumps through some hoops to call numpy's random functions via Python, buffering it in a numpy array. Since numpy 1.8, numpy.random has a dedicated Cython/C API, so we might be able to replace this with an easier and more efficient solution.

https://numpy.org/doc/stable/reference/random/c-api.html

This is mostly a note for my future self, I have not yet looked into this in detail.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions