{
  "__type": "IngestedDoc",
  "__tag": 4010,
  "_content": {
    "Notes": {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "If the inputs or dtype are complex, the output will follow a logarithmic spiral in the complex plane.  (There are an infinite number of spirals passing through two points; the output will follow the shortest such path.)"
            }
          ]
        }
      ],
      "title": [],
      "level": 0,
      "target": null
    },
    "Warns": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    "Raises": {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "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": "samples",
              "annotation": "ndarray",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "ParamRef",
                      "__tag": 4071,
                      "name": "num"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " samples, equally spaced on a log scale."
                    }
                  ]
                }
              ]
            }
          ]
        }
      ],
      "title": [],
      "level": 0,
      "target": null
    },
    "Summary": {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "Return numbers spaced evenly on a log scale (a geometric progression)."
            }
          ]
        }
      ],
      "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": "start",
              "annotation": "array_like",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "The starting value of the sequence."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "stop",
              "annotation": "array_like",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "The final value of the sequence, unless "
                    },
                    {
                      "__type": "ParamRef",
                      "__tag": 4071,
                      "name": "endpoint"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " is False. In that case, "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "num + 1"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " values are spaced over the interval in log-space, of which all but the last (a sequence of length "
                    },
                    {
                      "__type": "ParamRef",
                      "__tag": 4071,
                      "name": "num"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ") are returned."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "num",
              "annotation": "integer, optional",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Number of samples to generate.  Default is 50."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "endpoint",
              "annotation": "boolean, optional",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "If true, "
                    },
                    {
                      "__type": "ParamRef",
                      "__tag": 4071,
                      "name": "stop"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " is the last sample. Otherwise, it is not included. Default is True."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "dtype",
              "annotation": "dtype",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "The type of the output array.  If "
                    },
                    {
                      "__type": "ParamRef",
                      "__tag": 4071,
                      "name": "dtype"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " is not given, the data type is inferred from "
                    },
                    {
                      "__type": "ParamRef",
                      "__tag": 4071,
                      "name": "start"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " and "
                    },
                    {
                      "__type": "ParamRef",
                      "__tag": 4071,
                      "name": "stop"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ". The inferred dtype will never be an integer; "
                    },
                    {
                      "__type": "InlineRole",
                      "__tag": 4003,
                      "value": "float",
                      "domain": null,
                      "role": null,
                      "inventory": null
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " is chosen even if the arguments would produce an array of integers."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "axis",
              "annotation": "int, optional",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "The axis in the result to store the samples.  Relevant only if start or stop are array-like.  By default (0), the samples will be along a new axis inserted at the beginning. Use -1 to get an axis at the end."
                    }
                  ]
                }
              ]
            }
          ]
        }
      ],
      "title": [],
      "level": 0,
      "target": null
    },
    "Extended Summary": {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "This is similar to "
            },
            {
              "__type": "InlineRole",
              "__tag": 4003,
              "value": "logspace",
              "domain": null,
              "role": null,
              "inventory": null
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ", but with endpoints specified directly. Each output sample is a constant multiple of the previous."
            }
          ]
        }
      ],
      "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": "/dev/numpy/build-install/usr/lib/python3.14/site-packages/numpy/_core/function_base.py",
  "item_line": 311,
  "item_type": "_ArrayFunctionDispatcher",
  "aliases": [
    "numpy.geomspace"
  ],
  "example_section_data": {
    "__type": "Section",
    "__tag": 4015,
    "children": [
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "import numpy as np\n",
        "execution_status": "success"
      },
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "np.geomspace(1, 1000, num=4)\nnp.geomspace(1, 1000, num=3, endpoint=False)\nnp.geomspace(1, 1000, num=4, endpoint=False)\nnp.geomspace(1, 256, num=9)\n",
        "execution_status": "failure"
      },
      {
        "__type": "Text",
        "__tag": 4046,
        "value": "\nNote that the above may not produce exact integers:\n\n"
      },
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "np.geomspace(1, 256, num=9, dtype=int)\nnp.around(np.geomspace(1, 256, num=9)).astype(int)\n",
        "execution_status": "success"
      },
      {
        "__type": "Text",
        "__tag": 4046,
        "value": "\nNegative, decreasing, and complex inputs are allowed:\n\n"
      },
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "np.geomspace(1000, 1, num=4)\nnp.geomspace(-1000, -1, num=4)\nnp.geomspace(1j, 1000j, num=4)  # Straight line\n",
        "execution_status": "success"
      },
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "np.geomspace(-1+0j, 1+0j, num=5)  # Circle\n",
        "execution_status": "failure"
      },
      {
        "__type": "Text",
        "__tag": 4046,
        "value": "\nGraphical illustration of `endpoint` parameter:\n\n"
      },
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "import matplotlib.pyplot as plt\nN = 10\ny = np.zeros(N)\nplt.semilogx(np.geomspace(1, 1000, N, endpoint=True), y + 1, 'o')\nplt.semilogx(np.geomspace(1, 1000, N, endpoint=False), y + 2, 'o')\n",
        "execution_status": "success"
      },
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "plt.axis([0.5, 2000, 0, 3])\n",
        "execution_status": "failure"
      },
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "plt.grid(True, color='0.7', linestyle='-', which='both', axis='both')\nplt.show()\n",
        "execution_status": "success"
      },
      {
        "__type": "Figure",
        "__tag": 4024,
        "value": {
          "__type": "RefInfo",
          "__tag": 4000,
          "module": "numpy",
          "version": "2.5.0.dev0+git20251130.2de293a",
          "kind": "assets",
          "path": "fig-2cdcf19fcc070fa7.png"
        }
      }
    ],
    "title": [],
    "level": 0,
    "target": null
  },
  "see_also": [
    {
      "__type": "SeeAlsoItem",
      "__tag": 4028,
      "name": {
        "__type": "CrossRef",
        "__tag": 4002,
        "value": "arange",
        "reference": {
          "__type": "RefInfo",
          "__tag": 4000,
          "module": "current-module",
          "version": "current-version",
          "kind": "to-resolve",
          "path": "arange"
        },
        "kind": "module"
      },
      "descriptions": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "Similar to linspace, with the step size specified instead of the number of samples."
            }
          ]
        }
      ],
      "type": null
    },
    {
      "__type": "SeeAlsoItem",
      "__tag": 4028,
      "name": {
        "__type": "CrossRef",
        "__tag": 4002,
        "value": "how-to-partition",
        "reference": {
          "__type": "RefInfo",
          "__tag": 4000,
          "module": "current-module",
          "version": "current-version",
          "kind": "to-resolve",
          "path": "how-to-partition"
        },
        "kind": "module"
      },
      "descriptions": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "ref"
            }
          ]
        }
      ],
      "type": null
    },
    {
      "__type": "SeeAlsoItem",
      "__tag": 4028,
      "name": {
        "__type": "CrossRef",
        "__tag": 4002,
        "value": "linspace",
        "reference": {
          "__type": "RefInfo",
          "__tag": 4000,
          "module": "current-module",
          "version": "current-version",
          "kind": "to-resolve",
          "path": "linspace"
        },
        "kind": "module"
      },
      "descriptions": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "Similar to geomspace, but with arithmetic instead of geometric progression."
            }
          ]
        }
      ],
      "type": null
    },
    {
      "__type": "SeeAlsoItem",
      "__tag": 4028,
      "name": {
        "__type": "CrossRef",
        "__tag": 4002,
        "value": "logspace",
        "reference": {
          "__type": "RefInfo",
          "__tag": 4000,
          "module": "current-module",
          "version": "current-version",
          "kind": "to-resolve",
          "path": "logspace"
        },
        "kind": "module"
      },
      "descriptions": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "Similar to geomspace, but with endpoints specified using log and base."
            }
          ]
        }
      ],
      "type": null
    }
  ],
  "signature": {
    "__type": "SignatureNode",
    "__tag": 4029,
    "kind": "function",
    "parameters": [
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "start",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": {
          "__type": "Empty",
          "__tag": 4031
        }
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "stop",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": {
          "__type": "Empty",
          "__tag": 4031
        }
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "num",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": "50"
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "endpoint",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": "True"
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "dtype",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": "None"
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "axis",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": "0"
      }
    ],
    "return_annotation": {
      "__type": "Empty",
      "__tag": 4031
    },
    "target_name": "geomspace"
  },
  "references": null,
  "qa": "numpy:geomspace",
  "arbitrary": [],
  "local_refs": [
    "axis",
    "dtype",
    "endpoint",
    "num",
    "samples",
    "start",
    "stop"
  ]
}