Skip to content

Use checkpoints instead of first to pick an arbitrary value of a func… #200

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "ContinuumArrays"
uuid = "7ae1f121-cc2c-504b-ac30-9b923412ae5c"
version = "0.19.1"
version = "0.19.2"

[deps]
AbstractFFTs = "621f4979-c628-5d54-868e-fcf4e3e8185c"
Expand Down
5 changes: 4 additions & 1 deletion src/bases/bases.jl
Original file line number Diff line number Diff line change
Expand Up @@ -311,8 +311,11 @@
MappedFactorization(factorize(view(P,:,jr), dims...; kws...), invmap(parentindices(L)[1]))
end

# Axiom of Choice: choose a point in the set
pointchoice(x::AbstractVector) = first(x)

Check warning on line 315 in src/bases/bases.jl

View check run for this annotation

Codecov / codecov/patch

src/bases/bases.jl#L315

Added line #L315 was not covered by tests
pointchoice(x) = first(checkpoints(x))

_any_eltype(B::AbstractQuasiArray{Any}) = typeof(first(B)) # assume types are same
_any_eltype(B::AbstractQuasiArray{Any}) = typeof(B[pointchoice.(axes(B))...]) # assume types are same
_any_eltype(B) = eltype(B)

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