{
  "__type": "IngestedDoc",
  "__tag": 4010,
  "_content": {
    "Notes": {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "In BLAS, the naming convention is that all functions start with a type prefix, which depends on the type of the principal matrix. These can be one of "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "{'s', 'd', 'c', 'z'}"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " for the NumPy types "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "{float32, float64, complex64, complex128}"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " respectively. The code and the dtype are stored in attributes "
            },
            {
              "__type": "CrossRef",
              "__tag": 4002,
              "value": "typecode",
              "reference": {
                "__type": "LocalRef",
                "__tag": 4022,
                "kind": "module",
                "path": "scipy.io._netcdf:netcdf_variable.typecode"
              },
              "kind": "module"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " and "
            },
            {
              "__type": "ParamRef",
              "__tag": 4071,
              "name": "dtype"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " of the returned functions."
            }
          ]
        }
      ],
      "title": [],
      "level": 0,
      "target": null
    },
    "Warns": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Raises": {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Parameters",
          "__tag": 4026,
          "children": [
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "",
              "annotation": "RuntimeError",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "If the requested LP64/ILP64 variant is not available."
                    }
                  ]
                }
              ]
            }
          ]
        }
      ],
      "title": [],
      "level": 0,
      "target": null
    },
    "Yields": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Methods": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Returns": {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Parameters",
          "__tag": 4026,
          "children": [
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "funcs",
              "annotation": "list",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "List containing the found function(s)."
                    }
                  ]
                }
              ]
            }
          ]
        }
      ],
      "title": [],
      "level": 0,
      "target": null
    },
    "Summary": {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "Return available BLAS function objects from names."
            }
          ]
        }
      ],
      "title": [],
      "level": 0,
      "target": null
    },
    "Receives": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Warnings": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Attributes": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Parameters": {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Parameters",
          "__tag": 4026,
          "children": [
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "names",
              "annotation": "str or sequence of str",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Name(s) of BLAS functions without type prefix."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "arrays",
              "annotation": "sequence of ndarrays, optional",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Arrays can be given to determine optimal prefix of BLAS routines. If not given, double-precision routines will be used, otherwise the most generic type in arrays will be used."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "dtype",
              "annotation": "str or dtype, optional",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Data-type specifier. Not used if "
                    },
                    {
                      "__type": "ParamRef",
                      "__tag": 4071,
                      "name": "arrays"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " is non-empty."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "ilp64",
              "annotation": "{True, False, 'preferred'}, optional",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Whether to return ILP64 routine variant. Choosing "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "'preferred'"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " returns ILP64 routine if available, and otherwise the 32-bit (LP64) routine. Default: "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "'preferred'"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "."
                    }
                  ]
                }
              ]
            }
          ]
        }
      ],
      "title": [],
      "level": 0,
      "target": null
    },
    "Extended Summary": {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "Arrays are used to determine the optimal prefix of BLAS routines."
            }
          ]
        }
      ],
      "title": [],
      "level": 0,
      "target": null
    },
    "Other Parameters": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    }
  },
  "_ordered_sections": [
    "Summary",
    "Extended Summary",
    "Parameters",
    "Attributes",
    "Methods",
    "Returns",
    "Yields",
    "Receives",
    "Other Parameters",
    "Raises",
    "Warns",
    "Warnings",
    "Notes"
  ],
  "item_file": "/scipy/linalg/blas.py",
  "item_line": 430,
  "item_type": "function",
  "aliases": [
    "scipy.linalg.get_blas_funcs"
  ],
  "example_section_data": {
    "__type": "Section",
    "__tag": 4015,
    "children": [
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "import numpy as np\nimport scipy.linalg as LA\nrng = np.random.default_rng()\na = rng.random((3, 2))\nx_gemv = LA.get_blas_funcs('gemv', (a,))\n",
        "execution_status": "success",
        "out": ""
      },
      {
        "__type": "Text",
        "__tag": 4046,
        "value": "\nNote that ``x_gemv`` string representation shows the exact BLAS function with the\nprefix (here, ``d-`` because ``a`` is double precision real):\n\n"
      },
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "x_gemv\n",
        "execution_status": "success",
        "out": "<fortran function dgemv>\n"
      },
      {
        "__type": "Text",
        "__tag": 4046,
        "value": "\nThe BLAS variant information is also available from the ``typecode`` attribute:\n\n"
      },
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "x_gemv.typecode\n",
        "execution_status": "success",
        "out": "'d'\n"
      },
      {
        "__type": "Text",
        "__tag": 4046,
        "value": "\nFor double precision complex arrays, we select the ``z-`` variant, ``zgemv``\n\n"
      },
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "x_gemv = LA.get_blas_funcs('gemv', (a*1j,))\nx_gemv.typecode\n",
        "execution_status": "success",
        "out": "'z'\n"
      },
      {
        "__type": "Text",
        "__tag": 4046,
        "value": "\nIf you want to select a specific BLAS variant instead of relying on array types, use\nthe ``dtype=`` argument:\n\n"
      },
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "LA.get_blas_funcs('gemv', dtype=np.float32)\n",
        "execution_status": "success",
        "out": "<fortran function sgemv>\n"
      },
      {
        "__type": "Text",
        "__tag": 4046,
        "value": "\nThe ``int_dtype`` attribute stores whether the routine is ILP64 (integer arguments\nand outputs are 64-bit) or LP64 (integer arguments and outputs are 32-bit):\n\n"
      },
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "x_gemv.int_dtype\n",
        "execution_status": "failure",
        "out": "dtype('int32')\n"
      }
    ],
    "title": [],
    "level": 0,
    "target": null
  },
  "see_also": [
    {
      "__type": "SeeAlsoItem",
      "__tag": 4028,
      "name": {
        "__type": "CrossRef",
        "__tag": 4002,
        "value": "scipy.linalg.lapack.get_lapack_funcs",
        "reference": {
          "__type": "LocalRef",
          "__tag": 4022,
          "kind": "module",
          "path": "scipy.linalg.lapack:get_lapack_funcs"
        },
        "kind": "module"
      },
      "descriptions": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "a similar routine for selecting LAPACK functions."
            }
          ]
        }
      ],
      "type": null
    }
  ],
  "signature": {
    "__type": "SignatureNode",
    "__tag": 4029,
    "kind": "function",
    "parameters": [
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "names",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": {
          "__type": "Empty",
          "__tag": 4031
        }
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "arrays",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": "()"
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "dtype",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": "None"
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "ilp64",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": "preferred"
      }
    ],
    "return_annotation": {
      "__type": "Empty",
      "__tag": 4031
    },
    "target_name": "get_blas_funcs"
  },
  "references": null,
  "qa": "scipy.linalg.blas:get_blas_funcs",
  "arbitrary": [],
  "local_refs": [
    "arrays",
    "dtype",
    "funcs",
    "ilp64",
    "names"
  ]
}