Skip to content

Commit

Permalink
Update basic_problems.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisRackauckas authored Sep 20, 2023
1 parent 819ec92 commit d70980e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/problems/basic_problems.jl
Original file line number Diff line number Diff line change
Expand Up @@ -426,18 +426,18 @@ SampledIntegralProblem(y::AbstractArray, x::AbstractVector; dim=ndims(y), kwargs
The fields match the names of the constructor arguments.
"""
struct SampledIntegralProblem{Y, X, D, K} <: AbstractIntegralProblem{false}
struct SampledIntegralProblem{Y, X, K} <: AbstractIntegralProblem{false}
y::Y
x::X
dim::D
dim::Int
kwargs::K
@add_kwonly function SampledIntegralProblem(y::AbstractArray, x::AbstractVector;
dim = ndims(y),
kwargs...)
@assert dim <= ndims(y) "The integration dimension `dim` is larger than the number of dimensions of the integrand `y`"
@assert length(x)==size(y, dim) "The integrand `y` must have the same length as the sampling points `x` along the integrated dimension."
@assert axes(x, 1)==axes(y, dim) "The integrand `y` must obey the same indexing as the sampling points `x` along the integrated dimension."
new{typeof(y), typeof(x), typeof(dim), typeof(kwargs)}(y, x, dim, kwargs)
new{typeof(y), typeof(x), typeof(kwargs)}(y, x, dim, kwargs)
end
end

Expand Down

0 comments on commit d70980e

Please sign in to comment.