{
 "action": "Replace the old line with the new one; the rest of the code can stay.",
 "alternatives": [],
 "applicability": {
  "exit_code": 0,
  "line": 13,
  "method": "literal_patch",
  "occurrences": 1,
  "output": "same",
  "patched_sha": "7f3cd8b4201c",
  "reason": "applied word for word, the patch parses, drops the old names, runs on 1.18.1 and prints what the verified example prints",
  "run_on": "1.18.1",
  "status": "applies"
 },
 "by_notes": true,
 "changelog_ref": {
  "quote": "The deprecated ``atol`` argument of `scipy.optimize.nnls` has been",
  "url": "https://github.com/scipy/scipy/releases"
 },
 "confirmations": {
  "failed": 0,
  "worked": 2
 },
 "detect": [
  "atol"
 ],
 "ecosystem": "pypi",
 "equivalence": "same",
 "error_kind": "unexpected_kwarg",
 "error_signature": {
  "message": "nnls() got an unexpected keyword argument 'atol'",
  "norm": "unexpected_kwarg:atol",
  "type": "TypeError"
 },
 "first_seen": "2026-10-20T16:11:13+00:00",
 "format": "replace",
 "format_version": 2,
 "id": "pypi/scipy/1.18.1/0001",
 "kind": "removed",
 "license": "https://creativecommons.org/licenses/by/4.0/",
 "package": "scipy",
 "proof": {
  "applicability": {
   "exit_code": 0,
   "line": 13,
   "method": "literal_patch",
   "occurrences": 1,
   "output": "same",
   "patched_sha": "7f3cd8b4201c",
   "reason": "applied word for word, the patch parses, drops the old names, runs on 1.18.1 and prints what the verified example prints",
   "run_on": "1.18.1",
   "status": "applies"
  },
  "auto_apply": true,
  "auto_apply_reason": "proof.equivalent is true and the patch applies word for word",
  "auto_apply_rule": "Automatic application is allowed only when proof.equivalent is true and proof.applicability.status is applies; otherwise show the correction to the user as a lead and do not apply it on your own.",
  "equivalence": "same",
  "equivalent": true,
  "fails_on": "1.18.1",
  "fixed_on": "1.18.1",
  "level": "differential",
  "method": {
   "fix_on": "1.18.1",
   "name": "stdout_match",
   "normalization": "lines stripped, blank lines dropped, runs of whitespace collapsed; memory addresses, timestamps and temporary paths masked",
   "original_on": "1.17.1",
   "scope": "the observable stdout of one example script; return values, files, other inputs and exception types are not compared, so a match is not a proof of equivalent behaviour"
  },
  "script_right": "from scipy.optimize import nnls\n\n\ndef main():\n    A = [\n        [1, 0, 2],\n        [0, 1, 1],\n        [3, 1, 0],\n        [1, 2, 1],\n    ]\n    b = [4, 2, 5, 3]\n\n    x, residual_norm = nnls(A, b)\n\n    print(\"Solution vector:\", x)\n    print(\"Residual norm:\", residual_norm)\n\n\nif __name__ == \"__main__\":\n    main()",
  "script_wrong": "from scipy.optimize import nnls\n\n\ndef main():\n    A = [\n        [1, 0, 2],\n        [0, 1, 1],\n        [3, 1, 0],\n        [1, 2, 1],\n    ]\n    b = [4, 2, 5, 3]\n\n    x, residual_norm = nnls(A, b, atol=1e-8)\n\n    print(\"Solution vector:\", x)\n    print(\"Residual norm:\", residual_norm)\n\n\nif __name__ == \"__main__\":\n    main()",
  "works_on": "1.17.1"
 },
 "right": "x, residual_norm = nnls(A, b)",
 "seen_in_models": [
  "gpt-6.1-sol"
 ],
 "seq": 1,
 "slug": "scipy-optimize-nnls",
 "source": "pipeline",
 "symbol": "scipy.optimize.nnls",
 "updated": "2026-10-27T17:20:00+00:00",
 "url": "https://formachines.ai/errata/pypi/scipy/0001-scipy-optimize-nnls/",
 "variant_confirmations": 2,
 "variant_models": [
  "gpt-6.1-sol"
 ],
 "verified": "sandbox",
 "versions": {
  "changed_in": ">1.17.1,<=1.18.1",
  "fails_on": "1.18.1",
  "works_on": "1.17.1"
 },
 "wrong": "x, residual_norm = nnls(A, b, atol=1e-8)"
}