Skip to content

Commit cd31f3b

Browse files
committed
fix: Update in-place interpolation example to use similar() for output array
1 parent 341676e commit cd31f3b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ linear_interp(x, y, xq)
4040
cubic_interp(x, y, xq)
4141

4242
# In-place interpolation for maximum performance and zero-allocation
43-
out = zeros(N_query)
43+
out = similar(xq)
4444
for step in 1:1000
4545
y = compute_new_values(step) # evolving y over time
4646

0 commit comments

Comments
 (0)