Skip to content
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

reapply formatter #361

Merged
merged 1 commit into from
Feb 26, 2024
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
3 changes: 2 additions & 1 deletion .JuliaFormatter.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
style = "sciml"
format_markdown = true
format_markdown = true
format_docstrings = true
6 changes: 3 additions & 3 deletions src/named_array_partition.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/utils.jl
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 3 additions & 1 deletion src/vector_of_array.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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}}
Expand Down
4 changes: 2 additions & 2 deletions test/downstream/symbol_indexing.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down Expand Up @@ -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])
Expand Down
Loading