{
  "__type": "IngestedDoc",
  "__tag": 4010,
  "_content": {
    "Notes": {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "DefList",
          "__tag": 4033,
          "children": [
            {
              "__type": "DefListItem",
              "__tag": 4037,
              "dt": {
                "__type": "Paragraph",
                "__tag": 4045,
                "children": [
                  {
                    "__type": "Text",
                    "__tag": 4046,
                    "value": "JAX"
                  }
                ]
              },
              "dd": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "This allows applying eager functions to jitted JAX arrays, which are lazy.     The function won't be applied until the JAX array is materialized.     When running inside "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "jax.jit"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ", "
                    },
                    {
                      "__type": "ParamRef",
                      "__tag": 4071,
                      "name": "shape"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " must be fully known, i.e. it cannot     contain any "
                    },
                    {
                      "__type": "InlineRole",
                      "__tag": 4003,
                      "value": "None",
                      "domain": null,
                      "role": null,
                      "inventory": null
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " elements."
                    }
                  ]
                },
                {
                  "__type": "Admonition",
                  "__tag": 4056,
                  "kind": "warning",
                  "base_type": "warning",
                  "children": [
                    {
                      "__type": "AdmonitionTitle",
                      "__tag": 4055,
                      "children": [
                        {
                          "__type": "Text",
                          "__tag": 4046,
                          "value": "warning "
                        }
                      ]
                    },
                    {
                      "__type": "DefList",
                      "__tag": 4033,
                      "children": [
                        {
                          "__type": "DefListItem",
                          "__tag": 4037,
                          "dt": {
                            "__type": "Paragraph",
                            "__tag": 4045,
                            "children": [
                              {
                                "__type": "ParamRef",
                                "__tag": 4071,
                                "name": "func"
                              },
                              {
                                "__type": "Text",
                                "__tag": 4046,
                                "value": " must never raise inside "
                              },
                              {
                                "__type": "InlineCode",
                                "__tag": 4051,
                                "value": "jax.jit"
                              },
                              {
                                "__type": "Text",
                                "__tag": 4046,
                                "value": ", as the resulting behavior is"
                              }
                            ]
                          },
                          "dd": [
                            {
                              "__type": "Paragraph",
                              "__tag": 4045,
                              "children": [
                                {
                                  "__type": "Text",
                                  "__tag": 4046,
                                  "value": "undefined."
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  ]
                },
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Using this with "
                    },
                    {
                      "__type": "InlineRole",
                      "__tag": 4003,
                      "value": "as_numpy=False",
                      "domain": null,
                      "role": null,
                      "inventory": null
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " is particularly useful to apply non-jittable     JAX functions to arrays on GPU devices.     If "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "as_numpy=True"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ", the "
                    },
                    {
                      "__type": "CrossRef",
                      "__tag": 4002,
                      "value": "jax:transfer_guard",
                      "reference": {
                        "__type": "LocalRef",
                        "__tag": 4022,
                        "kind": "docs",
                        "path": "jax:transfer_guard"
                      },
                      "kind": "docs"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " may prevent arrays on a GPU     device from being transferred back to CPU. This is treated as an implicit     transfer."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DefListItem",
              "__tag": 4037,
              "dt": {
                "__type": "Paragraph",
                "__tag": 4045,
                "children": [
                  {
                    "__type": "Text",
                    "__tag": 4046,
                    "value": "PyTorch, CuPy"
                  }
                ]
              },
              "dd": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "If "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "as_numpy=True"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ", these backends raise by default if you attempt to convert     arrays on a GPU device to NumPy."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DefListItem",
              "__tag": 4037,
              "dt": {
                "__type": "Paragraph",
                "__tag": 4045,
                "children": [
                  {
                    "__type": "Text",
                    "__tag": 4046,
                    "value": "Sparse"
                  }
                ]
              },
              "dd": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "If "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "as_numpy=True"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ", by default sparse prevents implicit densification through     "
                    },
                    {
                      "__type": "CrossRef",
                      "__tag": 4002,
                      "value": "numpy.asarray",
                      "reference": {
                        "__type": "RefInfo",
                        "__tag": 4000,
                        "module": "numpy",
                        "version": "*",
                        "kind": "api",
                        "path": "numpy:asarray"
                      },
                      "kind": "module"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ". "
                    },
                    {
                      "__type": "Link",
                      "__tag": 4049,
                      "children": [
                        {
                          "__type": "Text",
                          "__tag": 4046,
                          "value": "This safety mechanism can be disabled"
                        }
                      ],
                      "url": "https://sparse.pydata.org/en/stable/operations.html#package-configuration",
                      "title": ""
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DefListItem",
              "__tag": 4037,
              "dt": {
                "__type": "Paragraph",
                "__tag": 4045,
                "children": [
                  {
                    "__type": "Text",
                    "__tag": 4046,
                    "value": "Dask"
                  }
                ]
              },
              "dd": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "This allows applying eager functions to Dask arrays.     The Dask graph won't be computed until the user calls "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "compute()"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " or     "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "persist()"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " down the line."
                    }
                  ]
                },
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "The function name will be prominently visible on the user-facing Dask     dashboard and on Prometheus metrics, so it is recommended for it to be     meaningful."
                    }
                  ]
                },
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "CrossRef",
                      "__tag": 4002,
                      "value": "lazy_apply",
                      "reference": {
                        "__type": "LocalRef",
                        "__tag": 4022,
                        "kind": "module",
                        "path": "scipy._lib.array_api_extra._lib._lazy:lazy_apply"
                      },
                      "kind": "module"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " doesn't know if "
                    },
                    {
                      "__type": "ParamRef",
                      "__tag": 4071,
                      "name": "func"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " reduces along any axes; also, shape     changes are non-trivial in chunked Dask arrays. For these reasons, all inputs     will be rechunked into a single chunk."
                    }
                  ]
                },
                {
                  "__type": "Admonition",
                  "__tag": 4056,
                  "kind": "warning",
                  "base_type": "warning",
                  "children": [
                    {
                      "__type": "AdmonitionTitle",
                      "__tag": 4055,
                      "children": [
                        {
                          "__type": "Text",
                          "__tag": 4046,
                          "value": "warning "
                        }
                      ]
                    },
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "Text",
                          "__tag": 4046,
                          "value": "The whole operation needs to fit in memory all at once on a single worker."
                        }
                      ]
                    }
                  ]
                },
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "The outputs will also be returned as a single chunk and you should consider     rechunking them into smaller chunks afterwards."
                    }
                  ]
                },
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "If you want to distribute the calculation across multiple workers, you     should use "
                    },
                    {
                      "__type": "InlineRole",
                      "__tag": 4003,
                      "value": "dask.array.map_blocks",
                      "domain": null,
                      "role": "func",
                      "inventory": null
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ", "
                    },
                    {
                      "__type": "InlineRole",
                      "__tag": 4003,
                      "value": "dask.array.map_overlap",
                      "domain": null,
                      "role": "func",
                      "inventory": null
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ",     "
                    },
                    {
                      "__type": "InlineRole",
                      "__tag": 4003,
                      "value": "dask.array.blockwise",
                      "domain": null,
                      "role": "func",
                      "inventory": null
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ", or a native Dask wrapper instead of     "
                    },
                    {
                      "__type": "CrossRef",
                      "__tag": 4002,
                      "value": "lazy_apply",
                      "reference": {
                        "__type": "LocalRef",
                        "__tag": 4022,
                        "kind": "module",
                        "path": "scipy._lib.array_api_extra._lib._lazy:lazy_apply"
                      },
                      "kind": "module"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DefListItem",
              "__tag": 4037,
              "dt": {
                "__type": "Paragraph",
                "__tag": 4045,
                "children": [
                  {
                    "__type": "Text",
                    "__tag": 4046,
                    "value": "Dask wrapping around other backends"
                  }
                ]
              },
              "dd": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "If "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "as_numpy=False"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ", "
                    },
                    {
                      "__type": "ParamRef",
                      "__tag": 4071,
                      "name": "func"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " will receive in input eager arrays of the meta     namespace, as defined by the "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "._meta"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " attribute of the input Dask arrays.     The outputs of "
                    },
                    {
                      "__type": "ParamRef",
                      "__tag": 4071,
                      "name": "func"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " will be wrapped by the meta namespace, and then wrapped     again by Dask."
                    }
                  ]
                }
              ]
            }
          ]
        }
      ],
      "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": "ValueError",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "When "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "xp=jax.numpy"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ", the output "
                    },
                    {
                      "__type": "ParamRef",
                      "__tag": 4071,
                      "name": "shape"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " is unknown (it contains "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "None"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " on one or more axes) and this function was called inside "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "jax.jit"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "",
              "annotation": "RuntimeError",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "When "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "xp=sparse"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " and auto-densification is disabled."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "",
              "annotation": "Exception (backend-specific)",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "When the backend disallows implicit device to host transfers and the input arrays are on a non-CPU device, e.g. on GPU."
                    }
                  ]
                }
              ]
            }
          ]
        }
      ],
      "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": "",
              "annotation": "Array | tuple[Array, ...]",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "The result(s) of "
                    },
                    {
                      "__type": "ParamRef",
                      "__tag": 4071,
                      "name": "func"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " applied to the input arrays, wrapped in the same array namespace as the inputs. If shape is omitted or a single "
                    },
                    {
                      "__type": "InlineRole",
                      "__tag": 4003,
                      "value": "tuple[int | None, ...]",
                      "domain": null,
                      "role": null,
                      "inventory": null
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ", return a single array. Otherwise, return a tuple of arrays."
                    }
                  ]
                }
              ]
            }
          ]
        }
      ],
      "title": [],
      "level": 0,
      "target": null
    },
    "Summary": {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "Lazily apply an eager function."
            }
          ]
        }
      ],
      "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": "func",
              "annotation": "callable",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "The function to apply."
                    }
                  ]
                },
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "It must accept one or more array API compliant arrays as positional arguments. If "
                    },
                    {
                      "__type": "InlineRole",
                      "__tag": 4003,
                      "value": "as_numpy=True",
                      "domain": null,
                      "role": null,
                      "inventory": null
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ", inputs are converted to NumPy before they are passed to "
                    },
                    {
                      "__type": "ParamRef",
                      "__tag": 4071,
                      "name": "func"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ". It must return either a single array-like or a sequence of array-likes."
                    }
                  ]
                },
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "ParamRef",
                      "__tag": 4071,
                      "name": "func"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " must be a pure function, i.e. without side effects, as depending on the backend it may be executed more than once or never."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "*args",
              "annotation": "Array | int | float | complex | bool | None",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "One or more Array API compliant arrays, Python scalars, or None's."
                    }
                  ]
                },
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "If "
                    },
                    {
                      "__type": "InlineRole",
                      "__tag": 4003,
                      "value": "as_numpy=True",
                      "domain": null,
                      "role": null,
                      "inventory": null
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ", you need to be able to apply "
                    },
                    {
                      "__type": "CrossRef",
                      "__tag": 4002,
                      "value": "numpy.asarray",
                      "reference": {
                        "__type": "RefInfo",
                        "__tag": 4000,
                        "module": "numpy",
                        "version": "*",
                        "kind": "api",
                        "path": "numpy:asarray"
                      },
                      "kind": "module"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " to non-None args to convert them to NumPy; read notes below about specific backends."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "shape",
              "annotation": "tuple[int | None, ...] | Sequence[tuple[int | None, ...]], optional",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Output shape or sequence of output shapes, one for each output of "
                    },
                    {
                      "__type": "ParamRef",
                      "__tag": 4071,
                      "name": "func"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ". Default: assume single output and broadcast shapes of the input arrays."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "dtype",
              "annotation": "DType | Sequence[DType], optional",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Output dtype or sequence of output dtypes, one for each output of "
                    },
                    {
                      "__type": "ParamRef",
                      "__tag": 4071,
                      "name": "func"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ". dtype(s) must belong to the same array namespace as the input arrays. Default: infer the result type(s) from the input arrays."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "as_numpy",
              "annotation": "bool, optional",
              "desc": [
                {
                  "__type": "Blockquote",
                  "__tag": 4059,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "Text",
                          "__tag": 4046,
                          "value": "If True, convert the input arrays to NumPy before passing them to "
                        },
                        {
                          "__type": "ParamRef",
                          "__tag": 4071,
                          "name": "func"
                        },
                        {
                          "__type": "Text",
                          "__tag": 4046,
                          "value": ".  This is particularly useful to make NumPy-only functions, e.g. written in Cython"
                        }
                      ]
                    }
                  ]
                },
                {
                  "__type": "DefList",
                  "__tag": 4033,
                  "children": [
                    {
                      "__type": "DefListItem",
                      "__tag": 4037,
                      "dt": {
                        "__type": "Paragraph",
                        "__tag": 4045,
                        "children": [
                          {
                            "__type": "Text",
                            "__tag": 4046,
                            "value": "or Numba, work transparently with array API-compliant arrays."
                          }
                        ]
                      },
                      "dd": [
                        {
                          "__type": "Paragraph",
                          "__tag": 4045,
                          "children": [
                            {
                              "__type": "Text",
                              "__tag": 4046,
                              "value": "Default: False."
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "xp",
              "annotation": "array_namespace, optional",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "The standard-compatible namespace for "
                    },
                    {
                      "__type": "ParamRef",
                      "__tag": 4071,
                      "name": "args"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ". Default: infer."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "**kwargs",
              "annotation": "Any, optional",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Additional keyword arguments to pass verbatim to "
                    },
                    {
                      "__type": "ParamRef",
                      "__tag": 4071,
                      "name": "func"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ". They cannot contain Array objects."
                    }
                  ]
                }
              ]
            }
          ]
        }
      ],
      "title": [],
      "level": 0,
      "target": null
    },
    "Extended Summary": {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "If the backend of the input arrays is lazy, e.g. Dask or jitted JAX, the execution of the function is delayed until the graph is materialized; if it's eager, the function is executed immediately."
            }
          ]
        }
      ],
      "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/_lib/array_api_extra/_lib/_lazy.py",
  "item_line": 57,
  "item_type": "function",
  "aliases": [
    "scipy.differentiate.xpx.lazy_apply"
  ],
  "example_section_data": {
    "__type": "Section",
    "__tag": 4015,
    "children": [],
    "title": [],
    "level": 0,
    "target": null
  },
  "see_also": [
    {
      "__type": "SeeAlsoItem",
      "__tag": 4028,
      "name": {
        "__type": "CrossRef",
        "__tag": 4002,
        "value": "dask.array.blockwise",
        "reference": {
          "__type": "RefInfo",
          "__tag": 4000,
          "module": "current-module",
          "version": "current-version",
          "kind": "to-resolve",
          "path": "dask.array.blockwise"
        },
        "kind": "module"
      },
      "descriptions": [],
      "type": null
    },
    {
      "__type": "SeeAlsoItem",
      "__tag": 4028,
      "name": {
        "__type": "CrossRef",
        "__tag": 4002,
        "value": "dask.array.map_blocks",
        "reference": {
          "__type": "RefInfo",
          "__tag": 4000,
          "module": "current-module",
          "version": "current-version",
          "kind": "to-resolve",
          "path": "dask.array.map_blocks"
        },
        "kind": "module"
      },
      "descriptions": [],
      "type": null
    },
    {
      "__type": "SeeAlsoItem",
      "__tag": 4028,
      "name": {
        "__type": "CrossRef",
        "__tag": 4002,
        "value": "dask.array.map_overlap",
        "reference": {
          "__type": "RefInfo",
          "__tag": 4000,
          "module": "current-module",
          "version": "current-version",
          "kind": "to-resolve",
          "path": "dask.array.map_overlap"
        },
        "kind": "module"
      },
      "descriptions": [],
      "type": null
    },
    {
      "__type": "SeeAlsoItem",
      "__tag": 4028,
      "name": {
        "__type": "CrossRef",
        "__tag": 4002,
        "value": "jax.pure_callback",
        "reference": {
          "__type": "RefInfo",
          "__tag": 4000,
          "module": "current-module",
          "version": "current-version",
          "kind": "to-resolve",
          "path": "jax.pure_callback"
        },
        "kind": "module"
      },
      "descriptions": [],
      "type": null
    },
    {
      "__type": "SeeAlsoItem",
      "__tag": 4028,
      "name": {
        "__type": "CrossRef",
        "__tag": 4002,
        "value": "jax.transfer_guard",
        "reference": {
          "__type": "RefInfo",
          "__tag": 4000,
          "module": "current-module",
          "version": "current-version",
          "kind": "to-resolve",
          "path": "jax.transfer_guard"
        },
        "kind": "module"
      },
      "descriptions": [],
      "type": null
    }
  ],
  "signature": {
    "__type": "SignatureNode",
    "__tag": 4029,
    "kind": "function",
    "parameters": [
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "func",
        "annotation": "Callable[P, Array | ArrayLike | Sequence[Array | ArrayLike]]",
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": {
          "__type": "Empty",
          "__tag": 4031
        }
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "args",
        "annotation": "Array | complex | None",
        "kind": "VAR_POSITIONAL",
        "default": {
          "__type": "Empty",
          "__tag": 4031
        }
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "shape",
        "annotation": "tuple[int | None, ...] | Sequence[tuple[int | None, ...]] | None",
        "kind": "KEYWORD_ONLY",
        "default": "None"
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "dtype",
        "annotation": "DType | Sequence[DType] | None",
        "kind": "KEYWORD_ONLY",
        "default": "None"
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "as_numpy",
        "annotation": "bool",
        "kind": "KEYWORD_ONLY",
        "default": "False"
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "xp",
        "annotation": "ModuleType | None",
        "kind": "KEYWORD_ONLY",
        "default": "None"
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "kwargs",
        "annotation": "P.kwargs",
        "kind": "VAR_KEYWORD",
        "default": {
          "__type": "Empty",
          "__tag": 4031
        }
      }
    ],
    "return_annotation": "Array | tuple[Array, ...]",
    "target_name": "lazy_apply"
  },
  "references": null,
  "qa": "scipy._lib.array_api_extra._lib._lazy:lazy_apply",
  "arbitrary": [],
  "local_refs": [
    "**kwargs",
    "*args",
    "as_numpy",
    "dtype",
    "func",
    "shape",
    "xp"
  ]
}