{
  "__type": "IngestedDoc",
  "__tag": 4010,
  "_content": {
    "Notes": {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "To sample from N evenly spaced floating-point numbers between a and b, use    "
            }
          ]
        },
        {
          "__type": "Code",
          "__tag": 4050,
          "value": "a + (b - a) * (np.random.random_integers(N) - 1) / (N - 1.)",
          "execution_status": null
        }
      ],
      "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": "out",
              "annotation": "int or ndarray of ints",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "ParamRef",
                      "__tag": 4071,
                      "name": "size"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "-shaped array of random integers from the appropriate distribution, or a single such random int if "
                    },
                    {
                      "__type": "ParamRef",
                      "__tag": 4071,
                      "name": "size"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " not provided."
                    }
                  ]
                }
              ]
            }
          ]
        }
      ],
      "title": [],
      "level": 0,
      "target": null
    },
    "Summary": {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "Random integers of type "
            },
            {
              "__type": "CrossRef",
              "__tag": 4002,
              "value": "numpy.int_",
              "reference": {
                "__type": "RefInfo",
                "__tag": 4000,
                "module": "numpy",
                "version": "*",
                "kind": "api",
                "path": "numpy:int64"
              },
              "kind": "module"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " between "
            },
            {
              "__type": "ParamRef",
              "__tag": 4071,
              "name": "low"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " and "
            },
            {
              "__type": "ParamRef",
              "__tag": 4071,
              "name": "high"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ", inclusive."
            }
          ]
        }
      ],
      "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": "low",
              "annotation": "int",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Lowest (signed) integer to be drawn from the distribution (unless "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "high=None"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ", in which case this parameter is the "
                    },
                    {
                      "__type": "Emphasis",
                      "__tag": 4047,
                      "children": [
                        {
                          "__type": "Text",
                          "__tag": 4046,
                          "value": "highest"
                        }
                      ]
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " such integer)."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "high",
              "annotation": "int, optional",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "If provided, the largest (signed) integer to be drawn from the distribution (see above for behavior if "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "high=None"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ")."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "DocParam",
              "__tag": 4016,
              "name": "size",
              "annotation": "int or tuple of ints, optional",
              "desc": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "Output shape.  If the given shape is, e.g., "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "(m, n, k)"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ", then "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "m * n * k"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " samples are drawn.  Default is None, in which case a single value is returned."
                    }
                  ]
                }
              ]
            }
          ]
        }
      ],
      "title": [],
      "level": 0,
      "target": null
    },
    "Extended Summary": {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "Return random integers of type "
            },
            {
              "__type": "CrossRef",
              "__tag": 4002,
              "value": "numpy.int_",
              "reference": {
                "__type": "RefInfo",
                "__tag": 4000,
                "module": "numpy",
                "version": "*",
                "kind": "api",
                "path": "numpy:int64"
              },
              "kind": "module"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " from the \"discrete uniform\" distribution in the closed interval ["
            },
            {
              "__type": "ParamRef",
              "__tag": 4071,
              "name": "low"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ", "
            },
            {
              "__type": "ParamRef",
              "__tag": 4071,
              "name": "high"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "].  If "
            },
            {
              "__type": "ParamRef",
              "__tag": 4071,
              "name": "high"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " is None (the default), then results are from [1, "
            },
            {
              "__type": "ParamRef",
              "__tag": 4071,
              "name": "low"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "]. The "
            },
            {
              "__type": "CrossRef",
              "__tag": 4002,
              "value": "numpy.int_",
              "reference": {
                "__type": "RefInfo",
                "__tag": 4000,
                "module": "numpy",
                "version": "*",
                "kind": "api",
                "path": "numpy:int64"
              },
              "kind": "module"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " type translates to the C long integer type and its precision is platform dependent."
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "This function has been deprecated. Use randint instead."
            }
          ]
        },
        {
          "__type": "Admonition",
          "__tag": 4056,
          "kind": "deprecated",
          "base_type": "neutral",
          "children": [
            {
              "__type": "AdmonitionTitle",
              "__tag": 4055,
              "children": [
                {
                  "__type": "Text",
                  "__tag": 4046,
                  "value": "deprecated 1.11.0"
                }
              ]
            }
          ]
        }
      ],
      "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": null,
  "item_line": null,
  "item_type": "cython_function_or_method",
  "aliases": [
    "numpy.random.random_integers",
    "numpy.random.RandomState.random_integers"
  ],
  "example_section_data": {
    "__type": "Section",
    "__tag": 4015,
    "children": [
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "np.random.random_integers(5)\n",
        "execution_status": "failure"
      },
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "type(np.random.random_integers(5))\n",
        "execution_status": "success"
      },
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "np.random.random_integers(5, size=(3,2))\n",
        "execution_status": "failure"
      },
      {
        "__type": "Text",
        "__tag": 4046,
        "value": "\nChoose five random numbers from the set of five evenly-spaced\nnumbers between 0 and 2.5, inclusive (*i.e.*, from the set\n:math:`{0, 5/8, 10/8, 15/8, 20/8}`):\n\n"
      },
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "2.5 * (np.random.random_integers(5, size=(5,)) - 1) / 4.\n",
        "execution_status": "failure"
      },
      {
        "__type": "Text",
        "__tag": 4046,
        "value": "\nRoll two six sided dice 1000 times and sum the results:\n\n"
      },
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "d1 = np.random.random_integers(1, 6, 1000)\nd2 = np.random.random_integers(1, 6, 1000)\ndsums = d1 + d2\n",
        "execution_status": "success"
      },
      {
        "__type": "Text",
        "__tag": 4046,
        "value": "\nDisplay results as a histogram:\n\n"
      },
      {
        "__type": "Code",
        "__tag": 4050,
        "value": "import matplotlib.pyplot as plt\ncount, bins, ignored = plt.hist(dsums, 11, density=True)\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-e7f8a54dedc6726f.png"
        }
      }
    ],
    "title": [],
    "level": 0,
    "target": null
  },
  "see_also": [
    {
      "__type": "SeeAlsoItem",
      "__tag": 4028,
      "name": {
        "__type": "CrossRef",
        "__tag": 4002,
        "value": "randint",
        "reference": {
          "__type": "LocalRef",
          "__tag": 4022,
          "kind": "module",
          "path": "numpy.random:RandomState.randint"
        },
        "kind": "module"
      },
      "descriptions": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "Similar to "
            },
            {
              "__type": "InlineRole",
              "__tag": 4003,
              "value": "random_integers",
              "domain": null,
              "role": null,
              "inventory": null
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ", only for the half-open interval ["
            },
            {
              "__type": "InlineRole",
              "__tag": 4003,
              "value": "low",
              "domain": null,
              "role": null,
              "inventory": null
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ", "
            },
            {
              "__type": "InlineRole",
              "__tag": 4003,
              "value": "high",
              "domain": null,
              "role": null,
              "inventory": null
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "), and 0 is the lowest value if "
            },
            {
              "__type": "InlineRole",
              "__tag": 4003,
              "value": "high",
              "domain": null,
              "role": null,
              "inventory": null
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " is omitted."
            }
          ]
        }
      ],
      "type": null
    }
  ],
  "signature": {
    "__type": "SignatureNode",
    "__tag": 4029,
    "kind": "function",
    "parameters": [
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "low",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": {
          "__type": "Empty",
          "__tag": 4031
        }
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "high",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": "None"
      },
      {
        "__type": "SigParam",
        "__tag": 4030,
        "name": "size",
        "annotation": {
          "__type": "Empty",
          "__tag": 4031
        },
        "kind": "POSITIONAL_OR_KEYWORD",
        "default": "None"
      }
    ],
    "return_annotation": {
      "__type": "Empty",
      "__tag": 4031
    },
    "target_name": "random_integers"
  },
  "references": null,
  "qa": "numpy.random:RandomState.random_integers",
  "arbitrary": [],
  "local_refs": [
    "high",
    "low",
    "out",
    "size"
  ]
}