Skip to content

Commit 374b9b9

Browse files
authored
Use checkpoints instead of first to pick an arbitrary value of a function (#200)
1 parent c572748 commit 374b9b9

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

Project.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "ContinuumArrays"
22
uuid = "7ae1f121-cc2c-504b-ac30-9b923412ae5c"
3-
version = "0.19.1"
3+
version = "0.19.2"
44

55
[deps]
66
AbstractFFTs = "621f4979-c628-5d54-868e-fcf4e3e8185c"

src/bases/bases.jl

+4-1
Original file line numberDiff line numberDiff line change
@@ -311,8 +311,11 @@ function _factorize(::MappedBasisLayout, L, dims...; kws...)
311311
MappedFactorization(factorize(view(P,:,jr), dims...; kws...), invmap(parentindices(L)[1]))
312312
end
313313

314+
# Axiom of Choice: choose a point in the set
315+
pointchoice(x::AbstractVector) = first(x)
316+
pointchoice(x) = first(checkpoints(x))
314317

315-
_any_eltype(B::AbstractQuasiArray{Any}) = typeof(first(B)) # assume types are same
318+
_any_eltype(B::AbstractQuasiArray{Any}) = typeof(B[pointchoice.(axes(B))...]) # assume types are same
316319
_any_eltype(B) = eltype(B)
317320

318321
plan_ldiv(A, B::AbstractQuasiVector) = factorize(convert(AbstractQuasiMatrix{promote_type(eltype(A), _any_eltype(B))}, A))

0 commit comments

Comments
 (0)