{"id":24298,"library":"pybammsolvers","title":"PyBAMMSolvers","description":"Python interface for the IDAKLU solver for block algebraic multigrid methods. Current version 0.8.1, requires Python >=3.10,<3.15. Development is active with occasional releases.","status":"active","version":"0.8.1","language":"python","source_language":"en","source_url":"https://github.com/ORNL/pybammsolvers","tags":["solver","AMG","multigrid","sparse","linear systems"],"install":[{"cmd":"pip install pybammsolvers","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Array manipulation and solver inputs","package":"numpy","optional":false},{"reason":"Sparse matrix support (CSR, CSC)","package":"scipy","optional":false}],"imports":[{"note":"The solver is inside the pybammsolvers namespace.","wrong":"import idaklu","symbol":"idaklu","correct":"from pybammsolvers import idaklu"}],"quickstart":{"code":"import numpy as np\nfrom scipy.sparse import csr_matrix\nfrom pybammsolvers import idaklu\n\n# Create a simple sparse matrix (CSR format)\nn = 100\nA = csr_matrix(np.random.rand(n, n) + 10 * np.eye(n))\nb = np.random.rand(n)\n\n# Solve using IDAKLU\nx = idaklu(A, b)\nprint(x[:5])","lang":"python","description":"Solves a sparse linear system A x = b using the IDAKLU solver."},"warnings":[{"fix":"Convert to scipy.sparse.csr_matrix before passing to idaklu.","message":"The idaklu function expects the matrix A in CSR or CSC format. Dense arrays will fail or produce incorrect results.","severity":"gotcha","affected_versions":"*"},{"fix":"Ensure the matrix is symmetric positive definite or at least positive real.","message":"The solver may not converge for indefinite matrices; it is designed for SPD-like systems.","severity":"gotcha","affected_versions":"*"},{"fix":"Review call signature: idaklu(A, b, reorder=1) works for basic usage.","message":"The function signature changed between 0.7.x and 0.8.x: previously the order of arguments was (A, b, ...) but now also supports additional options as keyword arguments.","severity":"deprecated","affected_versions":">=0.8.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use 'from pybammsolvers import idaklu' instead of 'import idaklu'.","cause":"Importing the solver directly without the package prefix.","error":"ModuleNotFoundError: No module named 'idaklu'"},{"fix":"Call idaklu(A, b) with the matrix first, right-hand side second.","cause":"Calling idaklu with only one argument or with keyword arguments incorrectly.","error":"TypeError: idaklu() missing 2 required positional arguments: 'A' and 'b'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}