Skip to content

Commit dfad592

Browse files
committed
[core] fix seed
1 parent 5a93362 commit dfad592

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

smcpp/commands/command.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Base class; subclasses will automatically show up as subcommands
2+
import numpy as np
23
import argparse
34
import os
45
import os.path
@@ -18,8 +19,10 @@ def __init__(self, parser):
1819
'''Configure parser and parse args.'''
1920
parser.add_argument('-v', '--verbose', action='count', default=0,
2021
help="increase debugging output, specify multiply times for more")
22+
parser.add_argument('--seed', type=int, default=0, help=argparse.SUPPRESS)
2123

2224
def main(self, args):
25+
np.random.seed(args.seed)
2326
logging.setup_logging(args.verbose)
2427

2528
class EstimationCommand(Command):

0 commit comments

Comments
 (0)