From a63795f011c8599a5432e73d9c12dd47f3dae5ce Mon Sep 17 00:00:00 2001 From: ChrisRackauckas Date: Mon, 29 Dec 2025 15:30:00 -0500 Subject: [PATCH] Accept AbstractMatrix in getstructure for better interface compliance MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change getstructure signature from Matrix to AbstractMatrix to support more array types like Symmetric, Adjoint, Transpose, and SubArray views. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- Project.toml | 2 +- src/SparseMatrixIdentification.jl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Project.toml b/Project.toml index 52ae515..4a47f11 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "SparseMatrixIdentification" uuid = "2607229e-3272-44a7-bc4a-cd97a328dfbf" -authors = ["Anastasia Dunca"] version = "1.0.0-DEV" +authors = ["Anastasia Dunca"] [deps] BandedMatrices = "aae01518-5342-5314-be14-df237901396f" diff --git a/src/SparseMatrixIdentification.jl b/src/SparseMatrixIdentification.jl index 52192c4..7a4ffd4 100644 --- a/src/SparseMatrixIdentification.jl +++ b/src/SparseMatrixIdentification.jl @@ -107,7 +107,7 @@ end export getstructure # get the percentage banded for a bandwidth of 1 and percentage sparsity -function getstructure(A::Matrix)::Any +function getstructure(A::AbstractMatrix)::Any percentage_banded = compute_bandedness(A, 1) percentage_sparsity = compute_sparsity(SparseMatrixCSC(A))