{
  "name": "Straight-line fitting functions in SciPy and NumPy: call signatures and returned fields",
  "description": "Compares the documented call signature, argument order and returned quantities of scipy.stats.linregress, scipy.stats.theilslopes and numpy.polyfit, compiled from the projects' official reference pages.",
  "page": "https://casrai.org/guides/linear-regression-scipy",
  "publisher": "CASRAI",
  "license": "https://creativecommons.org/licenses/by/4.0/",
  "dateModified": "2026-11-22T08:40:00Z",
  "temporalCoverage": null,
  "spatialCoverage": null,
  "columns": [
    {
      "name": "Function",
      "unit": "",
      "description": ""
    },
    {
      "name": "Call signature (documented)",
      "unit": "",
      "description": ""
    },
    {
      "name": "First positional argument",
      "unit": "",
      "description": ""
    },
    {
      "name": "Returns",
      "unit": "",
      "description": ""
    }
  ],
  "rows": [
    {
      "Function": "scipy.stats.linregress",
      "Call signature (documented)": "linregress(x, y, alternative='two-sided', *, axis=0, nan_policy='propagate', keepdims=False)",
      "First positional argument": "x (predictor)",
      "Returns": "slope, intercept, rvalue, pvalue, stderr, intercept_stderr"
    },
    {
      "Function": "scipy.stats.theilslopes",
      "Call signature (documented)": "theilslopes(y, x=None, alpha=0.95, method='separate', *, axis=None, nan_policy='propagate', keepdims=False)",
      "First positional argument": "y (response)",
      "Returns": "slope, intercept, low_slope, high_slope"
    },
    {
      "Function": "numpy.polyfit",
      "Call signature (documented)": "polyfit(x, y, deg, rcond=None, full=False, w=None, cov=False)",
      "First positional argument": "x (predictor)",
      "Returns": "polynomial coefficients, highest power first"
    }
  ],
  "sources": [
    {
      "title": "scipy.stats.linregress (SciPy v1.18.0)",
      "url": "https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.linregress.html",
      "accessed": "2026-11-14"
    },
    {
      "title": "scipy.stats.theilslopes",
      "url": "https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.theilslopes.html",
      "accessed": "2026-11-14"
    },
    {
      "title": "numpy.polyfit",
      "url": "https://numpy.org/doc/stable/reference/generated/numpy.polyfit.html",
      "accessed": "2026-11-14"
    }
  ]
}