linear-solver

Solve Ax=b linear systems with NumPy, JAX, PyTorch, and Lineax backends.

1|Updated Jan 16, 2026
One-click install
npx skills add https://github.com/yonesuke/skills --skill linear-solver
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: linear-solver
Source: https://github.com/yonesuke/skills/tree/main/linear_solver
Command: npx skills add https://github.com/yonesuke/skills --skill linear-solver

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires numpy, jax, jaxlib, torch, lineax, scipy, and includes scripts (resource) components.

What problem does it solve?

Solves Ax=b using a variety of backends (NumPy, JAX, PyTorch, and Lineax).

Core Features & Use Cases

  • Direct and iterative solvers: LU/Cholesky/QR/SVD, CG/GMRES, and TDMA for dense, sparse, and structured systems.
  • Multi-backend compatibility: Works with NumPy (CPU), JAX (GPU/TPU), PyTorch, and Lineax, enabling easy experimentation and differentiation.
  • Use Case: Quickly prototype solver strategies for large linear systems arising in simulations or data analysis.

Quick Start

Select a backend (NumPy, JAX, PyTorch, or Lineax) and run the provided example to solve Ax=b.

Frequently Asked Questions about linear-solver

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I solve linear systems Ax=b using JAX or PyTorch?

To solve linear systems Ax=b, you can use this tool to select JAX, PyTorch, NumPy, or Lineax as your backend. It exposes direct and iterative solvers, allowing you to compute solutions across different hardware accelerators like GPUs or TPUs seamlessly.

Can I use GMRES or CG iterative solvers for sparse matrices?

Yes, you can use iterative solvers like CG and GMRES for sparse matrices. The tool also supports direct methods including LU, Cholesky, QR, and SVD, alongside TDMA for structured systems, providing flexibility for various matrix properties.

What is the best way to compare solver performance across NumPy and JAX?

The best way to compare solver performance is using this unified interface, which standardizes direct and iterative methods across NumPy and JAX. You can rapidly prototype solver strategies and benchmark execution on CPU versus GPU or TPU backends.

Do I need Lineax installed to solve structured linear systems?

You do not need Lineax to solve structured linear systems unless you select it as your backend. The tool requires standard Python libraries and supports NumPy, JAX, and PyTorch, offering TDMA and other solvers for structured matrices independently.

When should I use direct solvers instead of iterative methods for linear equations?

Use direct solvers like LU, Cholesky, QR, or SVD for smaller or dense systems requiring high numerical stability. Switch to iterative methods like CG or GMRES for large, sparse systems where memory efficiency and approximation speed are prioritized.