File: py_set_seed.Rd

package info (click to toggle)
r-cran-reticulate 1.41.0.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,088 kB
  • sloc: cpp: 5,154; python: 620; sh: 13; makefile: 2
file content (24 lines) | stat: -rw-r--r-- 834 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/seed.R
\name{py_set_seed}
\alias{py_set_seed}
\title{Set Python and NumPy random seeds}
\usage{
py_set_seed(seed, disable_hash_randomization = TRUE)
}
\arguments{
\item{seed}{A single value, interpreted as an integer}

\item{disable_hash_randomization}{Disable hash randomization, which is
another common source of variable results. See
\url{https://docs.python.org/3/using/cmdline.html#envvar-PYTHONHASHSEED}}
}
\description{
Set various random seeds required to ensure reproducible results. The
provided \code{seed} value will establish a new random seed for Python and NumPy,
and will also (by default) disable hash randomization.
}
\details{
This function does not set the R random seed, for that you
should call \code{\link[=set.seed]{set.seed()}}.
}