Skip to content

Commit fbd85ce

Browse files
authored
use L1 norm for drop tolerance (#27)
* use L1 norm for drop tolerance * update CI
1 parent fb037de commit fbd85ce

File tree

2 files changed

+5
-14
lines changed

2 files changed

+5
-14
lines changed

.github/workflows/CI.yml

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,24 +23,15 @@ jobs:
2323
arch:
2424
- x64
2525
steps:
26-
- uses: actions/checkout@v2
27-
- uses: julia-actions/setup-julia@v1
26+
- uses: actions/checkout@v5
27+
- uses: julia-actions/setup-julia@v2
2828
with:
2929
version: ${{ matrix.version }}
3030
arch: ${{ matrix.arch }}
31-
- uses: actions/cache@v1
32-
env:
33-
cache-name: cache-artifacts
34-
with:
35-
path: ~/.julia/artifacts
36-
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
37-
restore-keys: |
38-
${{ runner.os }}-test-${{ env.cache-name }}-
39-
${{ runner.os }}-test-
40-
${{ runner.os }}-
31+
- uses: julia-actions/cache@v2
4132
- uses: julia-actions/julia-buildpkg@v1
4233
- uses: julia-actions/julia-runtest@v1
4334
- uses: julia-actions/julia-processcoverage@v1
44-
- uses: codecov/codecov-action@v1
35+
- uses: codecov/codecov-action@v5
4536
with:
4637
file: lcov.info

src/interp.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ infnorm(x::Number) = abs(x)
7272
infnorm(x::AbstractArray) = maximum(abs, x)
7373

7474
function droptol(coefs::Array{<:Any,N}, tol::Real) where {N}
75-
abstol = maximum(infnorm, coefs) * tol # absolute tolerance
75+
abstol = sum(infnorm, coefs) * tol # absolute tolerance = L1 norm * tol
7676
all(c -> infnorm(c) abstol, coefs) && return coefs # nothing to drop
7777

7878
# compute the new size along each dimension by checking

0 commit comments

Comments
 (0)