File: _newrand.pyx

package info (click to toggle)
scikit-learn 1.4.2%2Bdfsg-8
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 25,036 kB
  • sloc: python: 201,105; cpp: 5,790; ansic: 854; makefile: 304; sh: 56; javascript: 20
file content (13 lines) | stat: -rw-r--r-- 298 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
"""Wrapper for newrand.h"""

cdef extern from "newrand.h":
    void set_seed(unsigned int)
    unsigned int bounded_rand_int(unsigned int)


def set_seed_wrap(unsigned int custom_seed):
    set_seed(custom_seed)


def bounded_rand_int_wrap(unsigned int range_):
    return bounded_rand_int(range_)