Skip to content

Commit d2d83df

Browse files
author
xhlulu
committed
Add random seed to ensure reproducibility
1 parent 6621fa3 commit d2d83df

File tree

5 files changed

+10
-0
lines changed

5 files changed

+10
-0
lines changed

demos/pyvista-terrain-following-mesh/app.py

+2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313

1414
from dash_vtk.utils import presets
1515

16+
random.seed(42)
17+
1618

1719
def toDropOption(name):
1820
return {"label": name, "value": name}

demos/slice-rendering/app.py

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212

1313
import vtk
1414

15+
random.seed(42)
16+
1517
# Data file path
1618
demo_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
1719
head_vti = os.path.join(demo_dir, "data", "head.vti")

demos/synthetic-volume-rendering/app.py

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
import dash_vtk
55
import dash_html_components as html
66

7+
random.seed(42)
8+
79
app = dash.Dash(__name__)
810
server = app.server
911

demos/usage-algorithm/app.py

+2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
import dash_core_components as dcc
88
from dash.dependencies import Input, Output, State
99

10+
random.seed(42)
11+
1012
app = dash.Dash(__name__, external_stylesheets=[dbc.themes.BOOTSTRAP])
1113
server = app.server
1214

demos/usage-vtk-cfd/app.py

+2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414

1515
import vtk
1616

17+
random.seed(42)
18+
1719
# -----------------------------------------------------------------------------
1820
# VTK Pipeline
1921
# -----------------------------------------------------------------------------

0 commit comments

Comments
 (0)