Skip to content

Commit 1329f47

Browse files
authored
Use random subpackage from numpy (#26)
1 parent 9b73df5 commit 1329f47

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

heat/heat.py

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

33
import numpy as np
44
import yaml
5-
from scipy import ndimage, random
5+
from scipy import ndimage
66

77

88
def solve_2d(temp, spacing, out=None, alpha=1.0, time_step=1.0):
@@ -104,7 +104,7 @@ def __init__(
104104
self._alpha = alpha
105105
self._time_step = min(spacing) ** 2 / (4.0 * self._alpha)
106106

107-
self._temperature = random.random(self._shape)
107+
self._temperature = np.random.random(self._shape)
108108
self._next_temperature = np.empty_like(self._temperature)
109109

110110
@property

0 commit comments

Comments
 (0)