JuliaArrays / JuliaArrays/StaticArrays.jl

Implement isposdef

Open
#373 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug linear-algebra
Dominant language
Julia
Stars
844
Forks
159
Avg merge
3d 21h
Merged PRs (30d)
3

Description

isposdef on a SMatrix is hitting the default fallback calling isposdef!, which fails:

julia> a = @SMatrix [2 2;2 2]
2×2 StaticArrays.SArray{Tuple{2,2},Int64,2,4}:
 2  2
 2  2

julia> isposdef(a)
ERROR: MethodError: no method matching isposdef!(::StaticArrays.MArray{Tuple{2,2},Float64,2,4})
Closest candidates are:

This happened to me while trying to use DiffEq's DiffEqOperator with a static array.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the Julia example with the 2×2 SMatrix, then trace the SMatrix isposdef call into the default fallback that invokes isposdef!. Done means isposdef(a) works for the shown matrix without raising the missing isposdef! method error.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.