Skip to content

Commit

Permalink
Merge pull request #226 from ArnoStrouwen/typos
Browse files Browse the repository at this point in the history
typos CI
  • Loading branch information
ChrisRackauckas authored Dec 7, 2023
2 parents ffbed52 + ed52fe4 commit 48aaa11
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 14 deletions.
3 changes: 3 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,6 @@ updates:
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
ignore:
- dependency-name: "crate-ci/typos"
update-types: ["version-update:semver-patch"]
13 changes: 13 additions & 0 deletions .github/workflows/SpellCheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Spell Check

on: [pull_request]

jobs:
typos-check:
name: Spell Check with Typos
runs-on: ubuntu-latest
steps:
- name: Checkout Actions Repository
uses: actions/checkout@v3
- name: Check spelling
uses: crate-ci/[email protected]
2 changes: 2 additions & 0 deletions .typos.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[default.extend-words]
ND = "ND"
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ operators, fast tensor-product evaluations, pre-cached mutating
evaluations, as well as `Zygote`-compatible non-mutating evaluations.

The lazily implemented operator algebra allows the user to update the
operator state by passing in an update function that accepts arbirary
operator state by passing in an update function that accepts arbitrary
parameter objects. Further, our operators behave like `AbstractMatrix` types
thanks to overloads defined for methods in `Base`, and `LinearAlgebra`.

Expand All @@ -29,7 +29,7 @@ or `NonlinearSolve.jl` as a linear/nonlinear operator, or to

## Installation

`SciMLOperators.jl` is a registerd package and can be installed via
`SciMLOperators.jl` is a registered package and can be installed via

```
julia> import Pkg
Expand Down
4 changes: 2 additions & 2 deletions docs/src/interface.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ interface includes, but is not limited to, the following:
- `LinearAlgebra: mul!, ldiv!, lmul!, rmul!, factorize, issymmetric, ishermitian, isposdef`
- `SparseArrays: sparse, issparse`

## Multidimension arrays and batching
## Multidimensional arrays and batching

SciMLOperator can also be applied to `AbstractMatrix` subtypes where
operator-evaluation is done column-wise.
Expand Down Expand Up @@ -134,7 +134,7 @@ L(v, u, p, t) != zero(N) # true
```

The update behavior makes this package flexible enough to be used
in `OrdianryDiffEq`. As the parameter object `p` is often reserved
in `OrdinaryDiffEq`. As the parameter object `p` is often reserved
for sensitivity computation via automatic-differentiation, a user may
prefer to pass in state information via other arguments. For that
reason, we allow update functions with arbitrary keyword arguments.
Expand Down
4 changes: 2 additions & 2 deletions src/basic.jl
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ has_mul!(::IdentityOperator) = true
has_ldiv(::IdentityOperator) = true
has_ldiv!(::IdentityOperator) = true

# opeator application
# operator application
for op in (:*, :\)
@eval function Base.$op(ii::IdentityOperator, u::AbstractVecOrMat)
@assert size(u, 1) == ii.len
Expand Down Expand Up @@ -128,7 +128,7 @@ Base.iszero(::NullOperator) = true
has_adjoint(::NullOperator) = true
has_mul!(::NullOperator) = true

# opeator application
# operator application
Base.:*(nn::NullOperator, u::AbstractVecOrMat) = (@assert size(u, 1) == nn.len; zero(u))

function LinearAlgebra.mul!(v::AbstractVecOrMat, nn::NullOperator, u::AbstractVecOrMat)
Expand Down
14 changes: 7 additions & 7 deletions src/func.jl
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ function FunctionOperator(op,
end

if !_unwrap_val(_isinplace) & !_unwrap_val(_outofplace)
@error """Please provide a funciton with signatures `op(u, p, t)` for
@error """Please provide a function with signatures `op(u, p, t)` for
applying the operator out-of-place, and/or the signature is
`op(v, u, p, t)` for in-place application."""
end
Expand Down Expand Up @@ -569,13 +569,13 @@ function _sizecheck(L::FunctionOperator, u, v)
if !isa(u, AbstractVecOrMat)
msg = """$L constructed with `batch = true` only
accept input arrays that are `AbstractVecOrMat`s with
`size(L, 2) == size(u, 1)`. Recieved $(typeof(u))."""
`size(L, 2) == size(u, 1)`. Received $(typeof(u))."""
throw(ArgumentError(msg))
end

if size(L, 2) != size(u, 1)
msg = """$L accepts input `AbstractVecOrMat`s of size
($(size(L, 2)), K). Recievd array of size $(size(u))."""
($(size(L, 2)), K). Received array of size $(size(u))."""
throw(DimensionMismatch(msg))
end
end # u
Expand All @@ -584,13 +584,13 @@ function _sizecheck(L::FunctionOperator, u, v)
if !isa(v, AbstractVecOrMat)
msg = """$L constructed with `batch = true` only
returns output arrays that are `AbstractVecOrMat`s with
`size(L, 1) == size(v, 1)`. Recieved $(typeof(v))."""
`size(L, 1) == size(v, 1)`. Received $(typeof(v))."""
throw(ArgumentError(msg))
end

if size(L, 1) != size(v, 1)
msg = """$L accepts output `AbstractVecOrMat`s of size
($(size(L, 1)), K). Recievd array of size $(size(v))."""
($(size(L, 1)), K). Received array of size $(size(v))."""
throw(DimensionMismatch(msg))
end
end # v
Expand All @@ -611,7 +611,7 @@ function _sizecheck(L::FunctionOperator, u, v)
else # !batch
if !isnothing(u)
if size(u) (sizes[1], tuple(size(L, 2)))
msg = """$L recievd input array of size $(size(u)), but only
msg = """$L received input array of size $(size(u)), but only
accepts input arrays of size $(sizes[1]), or vectors like
`vec(u)` of size $(tuple(prod(sizes[1])))."""
throw(DimensionMismatch(msg))
Expand All @@ -620,7 +620,7 @@ function _sizecheck(L::FunctionOperator, u, v)

if !isnothing(v)
if size(v) (sizes[2], tuple(size(L, 1)))
msg = """$L recievd output array of size $(size(v)), but only
msg = """$L received output array of size $(size(v)), but only
accepts output arrays of size $(sizes[2]), or vectors like
`vec(u)` of size $(tuple(prod(sizes[2])))"""
throw(DimensionMismatch(msg))
Expand Down
2 changes: 1 addition & 1 deletion src/matrix.jl
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ $SIGNATURES
Represents an elementwise scaling (diagonal-scaling) operation that may
be applied to an `AbstractVecOrMat`. When `diag` is an `AbstractVector`
of length N, `L = DiagonalOpeator(diag, ...)` can be applied to
of length N, `L = DiagonalOperator(diag, ...)` can be applied to
`AbstractArray`s with `size(u, 1) == N`. Each column of the `u` will be
scaled by `diag`, as in `LinearAlgebra.Diagonal(diag) * u`.
Expand Down

0 comments on commit 48aaa11

Please sign in to comment.