Skip to content

Commit fc5c89d

Browse files
committed
numpy random s/randn/standard_normal/
1 parent 85d1cbb commit fc5c89d

File tree

28 files changed

+32
-30
lines changed

28 files changed

+32
-30
lines changed

examples/express/accordion_app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,5 @@ def txt():
1717

1818
@render.plot
1919
def histogram():
20-
x = 100 + 15 * np.random.default_rng(seed=19680801).randn(437)
20+
x = 100 + 15 * np.random.default_rng(seed=19680801).standard_normal(437)
2121
plt.hist(x, input.n(), density=True)

examples/express/column_wrap_app.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@
1212

1313
@render.plot
1414
def histogram():
15-
x = 100 + 15 * np.random.default_rng(seed=19680801).randn(437)
15+
x = 100 + 15 * np.random.default_rng(seed=19680801).standard_normal(437)
1616
plt.hist(x, input.n(), density=True)
1717

1818
with ui.card():
1919

2020
@render.plot
2121
def histogram2():
22-
x = 100 + 15 * np.random.default_rng(seed=19680801).randn(437)
22+
x = 100 + 15 * np.random.default_rng(seed=19680801).standard_normal(437)
2323
plt.hist(x, input.n(), density=True, color="red")

examples/express/nav_app.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
@render.plot
1515
def histogram():
16-
x = 100 + 15 * np.random.default_rng(seed=19680801).randn(437)
16+
x = 100 + 15 * np.random.default_rng(seed=19680801).standard_normal(437)
1717
plt.hist(x, input.n(), density=True)
1818

1919
with ui.navset_card_underline():
@@ -24,5 +24,5 @@ def histogram():
2424

2525
@render.plot
2626
def histogram2():
27-
x = 100 + 15 * np.random.default_rng(seed=19680801).randn(437)
27+
x = 100 + 15 * np.random.default_rng(seed=19680801).standard_normal(437)
2828
plt.hist(x, input.n2(), density=True)

examples/express/plot_app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@
99

1010
@render.plot
1111
def histogram():
12-
x = 100 + 15 * np.random.default_rng(seed=19680801).randn(437)
12+
x = 100 + 15 * np.random.default_rng(seed=19680801).standard_normal(437)
1313
plt.hist(x, input.n(), density=True)

examples/express/shared_app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
@render.plot
1414
def histogram():
15-
x = 100 + 15 * np.random.default_rng(seed=19680801).randn(437)
15+
x = 100 + 15 * np.random.default_rng(seed=19680801).standard_normal(437)
1616
plt.hist(x, shared.rv(), density=True)
1717

1818

examples/express/sidebar_app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@
1010

1111
@render.plot
1212
def histogram():
13-
x = 100 + 15 * np.random.default_rng(seed=19680801).randn(437)
13+
x = 100 + 15 * np.random.default_rng(seed=19680801).standard_normal(437)
1414
plt.hist(x, input.n(), density=True)

examples/static_plots/app.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ def plotnine():
9999
@render.plot
100100
def pandas():
101101
ts = pd.Series(
102-
rng.randn(1000),
102+
rng.standard_normal(1000),
103103
index=pd.date_range("1/1/2000", periods=1000),
104104
)
105105
ts = ts.cumsum()

shiny/api-examples/input_action_button/app-core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def server(input: Inputs, output: Outputs, session: Session):
1616
# (not when the slider is changed)
1717
@reactive.event(input.go, ignore_none=False)
1818
def plot():
19-
x = 100 + 15 * np.random.default_rng(seed=19680801).randn(input.n())
19+
x = 100 + 15 * np.random.default_rng(seed=19680801).standard_normal(input.n())
2020
fig, ax = plt.subplots()
2121
ax.hist(x, bins=30, density=True)
2222
return fig

shiny/api-examples/input_action_button/app-express.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# (not when the slider is changed)
1414
@reactive.event(input.go, ignore_none=False)
1515
def plot():
16-
x = 100 + 15 * np.random.default_rng(seed=19680801).randn(input.n())
16+
x = 100 + 15 * np.random.default_rng(seed=19680801).standard_normal(input.n())
1717
fig, ax = plt.subplots()
1818
ax.hist(x, bins=30, density=True)
1919
return fig

shiny/api-examples/input_action_link/app-core.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def server(input: Inputs, output: Outputs, session: Session):
1616
# the slider is changed
1717
@reactive.event(input.go, ignore_none=False)
1818
def plot():
19-
x = 100 + 15 * np.random.default_rng(seed=19680801).randn(input.n())
19+
x = 100 + 15 * np.random.default_rng(seed=19680801).standard_normal(input.n())
2020
fig, ax = plt.subplots()
2121
ax.hist(x, bins=30, density=True)
2222
return fig

0 commit comments

Comments
 (0)