Skip to content

Commit bb04f00

Browse files
committed
Add comment to explain copy operations
1 parent 5611d31 commit bb04f00

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

s2fft/transforms/otf_recursions.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ 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+
86+
# Create copy to prevent in-place updates propagating to caller
8587
lrenorm = lrenorm.copy()
8688

8789
for i in range(2):
@@ -490,6 +492,8 @@ def forward_latitudinal_step(
490492
if precomps is None:
491493
precomps = generate_precomputes(L, -mm, sampling, nside, True, L_lower)
492494
lrenorm, vsign, cpi, cp2, indices = precomps
495+
496+
# Create copy to prevent in-place updates propagating to caller
493497
lrenorm = lrenorm.copy()
494498

495499
for i in range(2):

0 commit comments

Comments
 (0)