diff --git a/.JuliaFormatter.toml b/.JuliaFormatter.toml index 9c793591..959ad88a 100644 --- a/.JuliaFormatter.toml +++ b/.JuliaFormatter.toml @@ -1,2 +1,3 @@ style = "sciml" -format_markdown = true \ No newline at end of file +format_markdown = true +format_docstrings = true \ No newline at end of file diff --git a/src/named_array_partition.jl b/src/named_array_partition.jl index ae16c66a..d0737e38 100644 --- a/src/named_array_partition.jl +++ b/src/named_array_partition.jl @@ -2,9 +2,9 @@ NamedArrayPartition(; kwargs...) NamedArrayPartition(x::NamedTuple) -Similar to an `ArrayPartition` but the individual arrays can be accessed via the -constructor-specified names. However, unlike `ArrayPartition`, each individual array -must have the same element type. +Similar to an `ArrayPartition` but the individual arrays can be accessed via the +constructor-specified names. However, unlike `ArrayPartition`, each individual array +must have the same element type. """ struct NamedArrayPartition{T, A <: ArrayPartition{T}, NT <: NamedTuple} <: AbstractVector{T} array_partition::A diff --git a/src/utils.jl b/src/utils.jl index a1b23208..ae4f1d2f 100644 --- a/src/utils.jl +++ b/src/utils.jl @@ -1,6 +1,6 @@ """ ```julia -recursivecopy(a::Union{AbstractArray{T, N}, AbstractVectorOfArray{T,N}}) +recursivecopy(a::Union{AbstractArray{T, N}, AbstractVectorOfArray{T, N}}) ``` A recursive `copy` function. Acts like a `deepcopy` on arrays of arrays, but diff --git a/src/vector_of_array.jl b/src/vector_of_array.jl index 0af4c507..cc335297 100644 --- a/src/vector_of_array.jl +++ b/src/vector_of_array.jl @@ -29,10 +29,12 @@ returns a vector of the series for each component, that is, `A[i,:]` for each `i A plot recipe is provided, which plots the `A[i,:]` series. There is also support for `VectorOfArray` with constructed from multi-dimensional arrays + ```julia VectorOfArray(u::AbstractArray{AT}) where {T, N, AT <: AbstractArray{T, N}} ``` -where `IndexStyle(typeof(u)) isa IndexLinear`. + +where `IndexStyle(typeof(u)) isa IndexLinear`. """ mutable struct VectorOfArray{T, N, A} <: AbstractVectorOfArray{T, N, A} u::A # A <: AbstractVector{<: AbstractArray{T, N - 1}} diff --git a/test/downstream/symbol_indexing.jl b/test/downstream/symbol_indexing.jl index 5d2e5262..06b724a9 100644 --- a/test/downstream/symbol_indexing.jl +++ b/test/downstream/symbol_indexing.jl @@ -7,7 +7,7 @@ include("../testutils.jl") @parameters τ @variables RHS(t) @mtkbuild fol_separate = ODESystem([RHS ~ (1 - x) / τ, - D(x) ~ RHS],t) + D(x) ~ RHS], t) prob = ODEProblem(fol_separate, [x => 0.0], (0.0, 10.0), [τ => 3.0]) sol = solve(prob, Tsit5()) @@ -41,7 +41,7 @@ test_tables_interface(sol_new, [:timestamp, Symbol("x(t)")], hcat(sol_new[t], so @variables y(t) @parameters α β γ δ @mtkbuild lv = ODESystem([D(x) ~ α * x - β * x * y, - D(y) ~ δ * x * y - γ * x * y],t) + D(y) ~ δ * x * y - γ * x * y], t) prob = ODEProblem(lv, [x => 1.0, y => 1.0], (0.0, 10.0), [α => 1.5, β => 1.0, γ => 3.0, δ => 1.0])