Skip to content

Commit 547352c

Browse files
committed
Fix standardchop for complex
1 parent 17fceba commit 547352c

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "ClassicalOrthogonalPolynomials"
22
uuid = "b30e2e7b-c4ee-47da-9d5f-2c5c27239acd"
33
authors = ["Sheehan Olver <[email protected]>"]
4-
version = "0.6.8"
4+
version = "0.6.9"
55

66
[deps]
77
ArrayLayouts = "4c555306-a7a7-4459-81d9-ec55ddd5c99a"

src/standardchop.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,9 @@ function standardchoplength(coeffs, tol)
4949
# Step 1: Convert COEFFS to a new monotonically nonincreasing
5050
# vector ENVELOPE normalized to begin with the value 1.
5151

52-
b = Vector(coeffs); b .= abs.(b)
52+
# convert to Vector first as copyto! is more likely to be optimised than
53+
# broadcast
54+
b = abs.(convert(Vector, coeffs))
5355
for j = n-1:-1:1
5456
b[j] = max(b[j], b[j+1])
5557
end

0 commit comments

Comments
 (0)