Skip to content

Commit 2f125b4

Browse files
committed
Copy array in precomps to avoid inplace update
1 parent 6082ebb commit 2f125b4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

s2fft/transforms/otf_recursions.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ def inverse_latitudinal_step(
8282
if precomps is None:
8383
precomps = generate_precomputes(L, -mm, sampling, nside, L_lower)
8484
lrenorm, vsign, cpi, cp2, indices = precomps
85+
lrenorm = lrenorm.copy()
8586

8687
for i in range(2):
8788
if not (reality and i == 0):
@@ -489,6 +490,7 @@ def forward_latitudinal_step(
489490
if precomps is None:
490491
precomps = generate_precomputes(L, -mm, sampling, nside, True, L_lower)
491492
lrenorm, vsign, cpi, cp2, indices = precomps
493+
lrenorm = lrenorm.copy()
492494

493495
for i in range(2):
494496
if not (reality and i == 0):

0 commit comments

Comments
 (0)