Skip to content

Commit 3f9f0c8

Browse files
author
Rolf Johan Lorentzen
committed
Remove redundant code
1 parent c6c34a1 commit 3f9f0c8

1 file changed

Lines changed: 3 additions & 8 deletions

File tree

src/geostat/gaussian_sim.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -120,14 +120,9 @@ def fast_gaussian(dimension, sdev, corr, num_samples=1):
120120
x = np.tensordot(cholt2, x, axes=([1], [1]))
121121
else:
122122
x = x.reshape(m, n, p, num_samples, order='F')
123-
if n <= p:
124-
x = np.tensordot(cholt1, x, axes=([1], [0]))
125-
x = np.tensordot(cholt2, x, axes=([1], [1]))
126-
x = np.tensordot(cholt3, x, axes=([1], [2]))
127-
else:
128-
x = np.tensordot(cholt1, x, axes=([1], [0]))
129-
x = np.tensordot(cholt2, x, axes=([1], [1]))
130-
x = np.tensordot(cholt3, x, axes=([1], [2]))
123+
x = np.tensordot(cholt1, x, axes=([1], [0]))
124+
x = np.tensordot(cholt2, x, axes=([1], [1]))
125+
x = np.tensordot(cholt3, x, axes=([1], [2]))
131126

132127
# Reshape back to (dim, num_samples) (order='C' is used here to match the original function's output)
133128
x = x.reshape((dim, num_samples), order='C')

0 commit comments

Comments
 (0)