Skip to content

Commit

Permalink
Call numpy.random.seed() on forking a new kernel
Browse files Browse the repository at this point in the history
  • Loading branch information
novoselt committed Apr 5, 2020
1 parent 22d9cfd commit b0b8ef6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions kernel_init.py
Expand Up @@ -162,6 +162,8 @@ def clear(changed=None):
sage_code = """
# Ensure unique random state after forking
set_random_seed()
import numpy.random
numpy.random.seed()
from sage.repl.rich_output import get_display_manager
from backend_cell import BackendCell
get_display_manager().switch_backend(BackendCell(), shell=get_ipython())
Expand Down

0 comments on commit b0b8ef6

Please sign in to comment.