{
  "__type": "IngestedDoc",
  "__tag": 4010,
  "_content": {},
  "_ordered_sections": [],
  "item_file": null,
  "item_line": null,
  "item_type": null,
  "aliases": [],
  "example_section_data": {
    "__type": "Section",
    "__tag": 4015,
    "children": [],
    "title": [],
    "level": 0,
    "target": null
  },
  "see_also": [],
  "signature": null,
  "references": null,
  "qa": "user:basics.types",
  "arbitrary": [
    {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Admonition",
          "__tag": 4056,
          "kind": "seealso",
          "base_type": "note",
          "children": [
            {
              "__type": "AdmonitionTitle",
              "__tag": 4055,
              "children": [
                {
                  "__type": "Text",
                  "__tag": 4046,
                  "value": "seealso :ref:`Data type objects <arrays.dtypes>`"
                }
              ]
            }
          ]
        }
      ],
      "title": [
        {
          "__type": "Text",
          "__tag": 4046,
          "value": "Data types"
        }
      ],
      "level": 0,
      "target": "basics.types"
    },
    {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "NumPy supports a much greater variety of numerical types than Python does. This section shows which are available, and how to modify an array's data-type."
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "NumPy numerical types are instances of "
            },
            {
              "__type": "CrossRef",
              "__tag": 4002,
              "value": "numpy.dtype",
              "reference": {
                "__type": "RefInfo",
                "__tag": 4000,
                "module": "numpy",
                "version": "*",
                "kind": "api",
                "path": "numpy:dtype"
              },
              "kind": "module"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " (data-type) objects, each having unique characteristics.  Once you have imported NumPy using "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "import numpy as np"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " you can create arrays with a specified dtype using the scalar types in the numpy top-level API, e.g. "
            },
            {
              "__type": "CrossRef",
              "__tag": 4002,
              "value": "numpy.bool",
              "reference": {
                "__type": "RefInfo",
                "__tag": 4000,
                "module": "numpy",
                "version": "*",
                "kind": "api",
                "path": "numpy:bool"
              },
              "kind": "module"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ", "
            },
            {
              "__type": "CrossRef",
              "__tag": 4002,
              "value": "numpy.float32",
              "reference": {
                "__type": "RefInfo",
                "__tag": 4000,
                "module": "numpy",
                "version": "*",
                "kind": "api",
                "path": "numpy:float32"
              },
              "kind": "module"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ", etc."
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "These scalar types as arguments to the dtype keyword that many numpy functions or methods accept. For example      "
            }
          ]
        },
        {
          "__type": "Code",
          "__tag": 4050,
          "value": ">>> z = np.arange(3, dtype=np.uint8)\n>>> z\narray([0, 1, 2], dtype=uint8)",
          "execution_status": null
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "Array types can also be referred to by character codes, for example    "
            }
          ]
        },
        {
          "__type": "Code",
          "__tag": 4050,
          "value": ">>> np.array([1, 2, 3], dtype='f')\narray([1.,  2.,  3.], dtype=float32)\n>>> np.array([1, 2, 3], dtype='d')\narray([1.,  2.,  3.], dtype=float64)",
          "execution_status": null
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "See "
            },
            {
              "__type": "CrossRef",
              "__tag": 4002,
              "value": "arrays.dtypes.constructing",
              "reference": {
                "__type": "LocalRef",
                "__tag": 4022,
                "kind": "docs",
                "path": "reference:arrays.dtypes"
              },
              "kind": "exists"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " for more information about specifying and constructing data type objects, including how to specify parameters like the byte order."
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "To determine the type of an array, look at the dtype attribute      "
            }
          ]
        },
        {
          "__type": "Code",
          "__tag": 4050,
          "value": ">>> z.dtype\ndtype('uint8')",
          "execution_status": null
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "dtype objects also contain information about the type, such as its bit-width and its byte-order.  The data type can also be used indirectly to query properties of the type, such as whether it is an integer      "
            }
          ]
        },
        {
          "__type": "Code",
          "__tag": 4050,
          "value": ">>> d = np.dtype(np.int64)\n>>> d\ndtype('int64')\n\n>>> np.issubdtype(d, np.integer)\nTrue\n\n>>> np.issubdtype(d, np.floating)\nFalse",
          "execution_status": null
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "To convert the type of an array, use the .astype() method. For example      "
            }
          ]
        },
        {
          "__type": "Code",
          "__tag": 4050,
          "value": ">>> z.astype(np.float64)                 #doctest: +NORMALIZE_WHITESPACE\narray([0.,  1.,  2.])",
          "execution_status": null
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "Note that, above, we could have used the "
            },
            {
              "__type": "Emphasis",
              "__tag": 4047,
              "children": [
                {
                  "__type": "Text",
                  "__tag": 4046,
                  "value": "Python"
                }
              ]
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " float object as a dtype instead of "
            },
            {
              "__type": "CrossRef",
              "__tag": 4002,
              "value": "numpy.float64",
              "reference": {
                "__type": "RefInfo",
                "__tag": 4000,
                "module": "numpy",
                "version": "*",
                "kind": "api",
                "path": "numpy:float64"
              },
              "kind": "module"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ".  NumPy knows that "
            },
            {
              "__type": "InlineRole",
              "__tag": 4003,
              "value": "int",
              "domain": null,
              "role": "class",
              "inventory": null
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " refers to "
            },
            {
              "__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": "InlineRole",
              "__tag": 4003,
              "value": "bool",
              "domain": null,
              "role": "class",
              "inventory": null
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " means "
            },
            {
              "__type": "CrossRef",
              "__tag": 4002,
              "value": "numpy.bool",
              "reference": {
                "__type": "RefInfo",
                "__tag": 4000,
                "module": "numpy",
                "version": "*",
                "kind": "api",
                "path": "numpy:bool"
              },
              "kind": "module"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ", that "
            },
            {
              "__type": "InlineRole",
              "__tag": 4003,
              "value": "float",
              "domain": null,
              "role": "class",
              "inventory": null
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " is "
            },
            {
              "__type": "CrossRef",
              "__tag": 4002,
              "value": "numpy.float64",
              "reference": {
                "__type": "RefInfo",
                "__tag": 4000,
                "module": "numpy",
                "version": "*",
                "kind": "api",
                "path": "numpy:float64"
              },
              "kind": "module"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " and "
            },
            {
              "__type": "InlineRole",
              "__tag": 4003,
              "value": "complex",
              "domain": null,
              "role": "class",
              "inventory": null
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " is "
            },
            {
              "__type": "CrossRef",
              "__tag": 4002,
              "value": "numpy.complex128",
              "reference": {
                "__type": "RefInfo",
                "__tag": 4000,
                "module": "numpy",
                "version": "*",
                "kind": "api",
                "path": "numpy:complex128"
              },
              "kind": "module"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ".  The other data-types do not have Python equivalents."
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "Sometimes the conversion can overflow, for instance when converting a "
            },
            {
              "__type": "CrossRef",
              "__tag": 4002,
              "value": "numpy.int64",
              "reference": {
                "__type": "RefInfo",
                "__tag": 4000,
                "module": "numpy",
                "version": "*",
                "kind": "api",
                "path": "numpy:int64"
              },
              "kind": "module"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " value 300 to "
            },
            {
              "__type": "CrossRef",
              "__tag": 4002,
              "value": "numpy.int8",
              "reference": {
                "__type": "RefInfo",
                "__tag": 4000,
                "module": "numpy",
                "version": "*",
                "kind": "api",
                "path": "numpy:int8"
              },
              "kind": "module"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ". NumPy follows C casting rules, so that value would overflow and become 44 "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "(300 - 256)"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ". If you wish to avoid such overflows, you can specify that the overflow action fail by using "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "same_value"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " for the "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "casting"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " argument (see also "
            },
            {
              "__type": "CrossRef",
              "__tag": 4002,
              "value": "overflow-errors",
              "reference": {
                "__type": "LocalRef",
                "__tag": 4022,
                "kind": "docs",
                "path": "user:basics.types"
              },
              "kind": "exists"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ")      "
            }
          ]
        },
        {
          "__type": "Code",
          "__tag": 4050,
          "value": ">>> z.astype(np.float64, casting=\"same_value\")   #doctest: +NORMALIZE_WHITESPACE\narray([0.,  1.,  2.])",
          "execution_status": null
        }
      ],
      "title": [
        {
          "__type": "Text",
          "__tag": 4046,
          "value": "Array types and conversions between types"
        }
      ],
      "level": 1,
      "target": null
    },
    {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "There are 5 basic numerical types representing booleans ("
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "bool"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "), integers ("
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "int"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "), unsigned integers ("
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "uint"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ") floating point ("
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "float"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ") and "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "complex"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ". A basic numerical type name combined with a numeric bitsize defines a concrete type.  The bitsize is the number of bits that are needed to represent a single value in memory. For example, "
            },
            {
              "__type": "CrossRef",
              "__tag": 4002,
              "value": "numpy.float64",
              "reference": {
                "__type": "RefInfo",
                "__tag": 4000,
                "module": "numpy",
                "version": "*",
                "kind": "api",
                "path": "numpy:float64"
              },
              "kind": "module"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " is a 64 bit floating point data type. Some types, such as "
            },
            {
              "__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": " and "
            },
            {
              "__type": "CrossRef",
              "__tag": 4002,
              "value": "numpy.intp",
              "reference": {
                "__type": "RefInfo",
                "__tag": 4000,
                "module": "numpy",
                "version": "*",
                "kind": "api",
                "path": "numpy:int64"
              },
              "kind": "module"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ", have differing bitsizes, dependent on the platforms (e.g. 32-bit vs. 64-bit CPU architectures).  This should be taken into account when interfacing with low-level code (such as C or Fortran) where the raw memory is addressed."
            }
          ]
        }
      ],
      "title": [
        {
          "__type": "Text",
          "__tag": 4046,
          "value": "Numerical Data Types"
        }
      ],
      "level": 2,
      "target": null
    },
    {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "In addition to numerical types, NumPy also supports storing unicode strings, via the "
            },
            {
              "__type": "CrossRef",
              "__tag": 4002,
              "value": "numpy.str_",
              "reference": {
                "__type": "RefInfo",
                "__tag": 4000,
                "module": "numpy",
                "version": "*",
                "kind": "api",
                "path": "numpy:str_"
              },
              "kind": "module"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " dtype ("
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "U"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " character code), null-terminated byte sequences via "
            },
            {
              "__type": "CrossRef",
              "__tag": 4002,
              "value": "numpy.bytes_",
              "reference": {
                "__type": "RefInfo",
                "__tag": 4000,
                "module": "numpy",
                "version": "*",
                "kind": "api",
                "path": "numpy:bytes_"
              },
              "kind": "module"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " ("
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "S"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " character code), and arbitrary byte sequences, via "
            },
            {
              "__type": "CrossRef",
              "__tag": 4002,
              "value": "numpy.void",
              "reference": {
                "__type": "RefInfo",
                "__tag": 4000,
                "module": "numpy",
                "version": "*",
                "kind": "api",
                "path": "numpy:void"
              },
              "kind": "module"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " ("
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "V"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " character code)."
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "All of the above are "
            },
            {
              "__type": "Emphasis",
              "__tag": 4047,
              "children": [
                {
                  "__type": "Text",
                  "__tag": 4046,
                  "value": "fixed-width"
                }
              ]
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " data types. They are parameterized by a width, in either bytes or unicode points, that a single data element in the array must fit inside. This means that storing an array of byte sequences or strings using this dtype requires knowing or calculating the sizes of the longest text or byte sequence in advance."
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "As an example, we can create an array storing the words "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "\"hello\""
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " and "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "\"world!\""
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "    "
            }
          ]
        },
        {
          "__type": "Code",
          "__tag": 4050,
          "value": ">>> np.array([\"hello\", \"world!\"])\narray(['hello', 'world!'], dtype='<U6')",
          "execution_status": null
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "Here the data type is detected as a unicode string that is a maximum of 6 code points long, enough to store both entries without truncation. If we specify a shorter or longer data type, the string is either truncated or zero-padded to fit in the specified width    "
            }
          ]
        },
        {
          "__type": "Code",
          "__tag": 4050,
          "value": ">>> np.array([\"hello\", \"world!\"], dtype=\"U5\")\narray(['hello', 'world'], dtype='<U5')\n>>> np.array([\"hello\", \"world!\"], dtype=\"U7\")\narray(['hello', 'world!'], dtype='<U7')",
          "execution_status": null
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "We can see the zero-padding a little more clearly if we use the bytes data type and ask NumPy to print out the bytes in the array buffer    "
            }
          ]
        },
        {
          "__type": "Code",
          "__tag": 4050,
          "value": ">>> np.array([\"hello\", \"world\"], dtype=\"S7\").tobytes()\nb'hello\\x00\\x00world\\x00\\x00'",
          "execution_status": null
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "Each entry is padded with two extra null bytes. Note however that NumPy cannot tell the difference between intentionally stored trailing nulls and padding nulls    "
            }
          ]
        },
        {
          "__type": "Code",
          "__tag": 4050,
          "value": ">>> x = [b\"hello\\0\\0\", b\"world\"]\n>>> a = np.array(x, dtype=\"S7\")\n>>> print(a[0])\nb\"hello\"\n>>> a[0] == x[0]\nFalse",
          "execution_status": null
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "If you need to store and round-trip any trailing null bytes, you will need to use an unstructured void data type    "
            }
          ]
        },
        {
          "__type": "Code",
          "__tag": 4050,
          "value": ">>> a = np.array(x, dtype=\"V7\")\n>>> a\narray([b'\\x68\\x65\\x6C\\x6C\\x6F\\x00\\x00', b'\\x77\\x6F\\x72\\x6C\\x64\\x00\\x00'],\n      dtype='|V7')\n>>> a[0] == np.void(x[0])\nTrue",
          "execution_status": null
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "Advanced types, not listed above, are explored in section "
            },
            {
              "__type": "CrossRef",
              "__tag": 4002,
              "value": "structured_arrays",
              "reference": {
                "__type": "LocalRef",
                "__tag": 4022,
                "kind": "docs",
                "path": "user:basics.rec"
              },
              "kind": "exists"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "."
            }
          ]
        }
      ],
      "title": [
        {
          "__type": "Text",
          "__tag": 4046,
          "value": "Data Types for Strings and Bytes"
        }
      ],
      "level": 2,
      "target": null
    },
    {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "NumPy provides both bit sized type names and names based on the names of C types. Since the definition of C types are platform dependent, this means the explicitly bit sized should be preferred to avoid platform-dependent behavior in programs using NumPy."
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "To ease integration with C code, where it is more natural to refer to platform-dependent C types, NumPy also provides type aliases that correspond to the C types for the platform. Some dtypes have trailing underscore to avoid confusion with builtin python type names, such as "
            },
            {
              "__type": "CrossRef",
              "__tag": 4002,
              "value": "numpy.bool_",
              "reference": {
                "__type": "RefInfo",
                "__tag": 4000,
                "module": "numpy",
                "version": "*",
                "kind": "api",
                "path": "numpy:bool"
              },
              "kind": "module"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "."
            }
          ]
        },
        {
          "__type": "Table",
          "__tag": 4065,
          "children": [
            {
              "__type": "TableRow",
              "__tag": 4068,
              "header": true,
              "children": [
                {
                  "__type": "TableCell",
                  "__tag": 4069,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "Text",
                          "__tag": 4046,
                          "value": "Canonical Python API name"
                        }
                      ]
                    }
                  ]
                },
                {
                  "__type": "TableCell",
                  "__tag": 4069,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "Text",
                          "__tag": 4046,
                          "value": "Python API \"C-like\" name"
                        }
                      ]
                    }
                  ]
                },
                {
                  "__type": "TableCell",
                  "__tag": 4069,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "Text",
                          "__tag": 4046,
                          "value": "Actual C type"
                        }
                      ]
                    }
                  ]
                },
                {
                  "__type": "TableCell",
                  "__tag": 4069,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "Text",
                          "__tag": 4046,
                          "value": "Description"
                        }
                      ]
                    }
                  ]
                }
              ]
            },
            {
              "__type": "TableRow",
              "__tag": 4068,
              "header": false,
              "children": [
                {
                  "__type": "TableCell",
                  "__tag": 4069,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "CrossRef",
                          "__tag": 4002,
                          "value": "numpy.bool",
                          "reference": {
                            "__type": "RefInfo",
                            "__tag": 4000,
                            "module": "numpy",
                            "version": "*",
                            "kind": "api",
                            "path": "numpy:bool"
                          },
                          "kind": "module"
                        },
                        {
                          "__type": "Text",
                          "__tag": 4046,
                          "value": " or "
                        },
                        {
                          "__type": "CrossRef",
                          "__tag": 4002,
                          "value": "numpy.bool_",
                          "reference": {
                            "__type": "RefInfo",
                            "__tag": 4000,
                            "module": "numpy",
                            "version": "*",
                            "kind": "api",
                            "path": "numpy:bool"
                          },
                          "kind": "module"
                        }
                      ]
                    }
                  ]
                },
                {
                  "__type": "TableCell",
                  "__tag": 4069,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "Text",
                          "__tag": 4046,
                          "value": "N/A"
                        }
                      ]
                    }
                  ]
                },
                {
                  "__type": "TableCell",
                  "__tag": 4069,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "InlineCode",
                          "__tag": 4051,
                          "value": "bool"
                        },
                        {
                          "__type": "Text",
                          "__tag": 4046,
                          "value": " (defined in "
                        },
                        {
                          "__type": "InlineCode",
                          "__tag": 4051,
                          "value": "stdbool.h"
                        },
                        {
                          "__type": "Text",
                          "__tag": 4046,
                          "value": ")"
                        }
                      ]
                    }
                  ]
                },
                {
                  "__type": "TableCell",
                  "__tag": 4069,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "Text",
                          "__tag": 4046,
                          "value": "Boolean (True or False) stored as a byte."
                        }
                      ]
                    }
                  ]
                }
              ]
            },
            {
              "__type": "TableRow",
              "__tag": 4068,
              "header": false,
              "children": [
                {
                  "__type": "TableCell",
                  "__tag": 4069,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "CrossRef",
                          "__tag": 4002,
                          "value": "numpy.int8",
                          "reference": {
                            "__type": "RefInfo",
                            "__tag": 4000,
                            "module": "numpy",
                            "version": "*",
                            "kind": "api",
                            "path": "numpy:int8"
                          },
                          "kind": "module"
                        }
                      ]
                    }
                  ]
                },
                {
                  "__type": "TableCell",
                  "__tag": 4069,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "CrossRef",
                          "__tag": 4002,
                          "value": "numpy.byte",
                          "reference": {
                            "__type": "RefInfo",
                            "__tag": 4000,
                            "module": "numpy",
                            "version": "*",
                            "kind": "api",
                            "path": "numpy:int8"
                          },
                          "kind": "module"
                        }
                      ]
                    }
                  ]
                },
                {
                  "__type": "TableCell",
                  "__tag": 4069,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "InlineCode",
                          "__tag": 4051,
                          "value": "signed char"
                        }
                      ]
                    }
                  ]
                },
                {
                  "__type": "TableCell",
                  "__tag": 4069,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "Text",
                          "__tag": 4046,
                          "value": "Platform-defined integer type with 8 bits."
                        }
                      ]
                    }
                  ]
                }
              ]
            },
            {
              "__type": "TableRow",
              "__tag": 4068,
              "header": false,
              "children": [
                {
                  "__type": "TableCell",
                  "__tag": 4069,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "CrossRef",
                          "__tag": 4002,
                          "value": "numpy.uint8",
                          "reference": {
                            "__type": "RefInfo",
                            "__tag": 4000,
                            "module": "numpy",
                            "version": "*",
                            "kind": "api",
                            "path": "numpy:uint8"
                          },
                          "kind": "module"
                        }
                      ]
                    }
                  ]
                },
                {
                  "__type": "TableCell",
                  "__tag": 4069,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "CrossRef",
                          "__tag": 4002,
                          "value": "numpy.ubyte",
                          "reference": {
                            "__type": "RefInfo",
                            "__tag": 4000,
                            "module": "numpy",
                            "version": "*",
                            "kind": "api",
                            "path": "numpy:uint8"
                          },
                          "kind": "module"
                        }
                      ]
                    }
                  ]
                },
                {
                  "__type": "TableCell",
                  "__tag": 4069,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "InlineCode",
                          "__tag": 4051,
                          "value": "unsigned char"
                        }
                      ]
                    }
                  ]
                },
                {
                  "__type": "TableCell",
                  "__tag": 4069,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "Text",
                          "__tag": 4046,
                          "value": "Platform-defined integer type with 8 bits without sign."
                        }
                      ]
                    }
                  ]
                }
              ]
            },
            {
              "__type": "TableRow",
              "__tag": 4068,
              "header": false,
              "children": [
                {
                  "__type": "TableCell",
                  "__tag": 4069,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "CrossRef",
                          "__tag": 4002,
                          "value": "numpy.int16",
                          "reference": {
                            "__type": "RefInfo",
                            "__tag": 4000,
                            "module": "numpy",
                            "version": "*",
                            "kind": "api",
                            "path": "numpy:int16"
                          },
                          "kind": "module"
                        }
                      ]
                    }
                  ]
                },
                {
                  "__type": "TableCell",
                  "__tag": 4069,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "CrossRef",
                          "__tag": 4002,
                          "value": "numpy.short",
                          "reference": {
                            "__type": "RefInfo",
                            "__tag": 4000,
                            "module": "numpy",
                            "version": "*",
                            "kind": "api",
                            "path": "numpy:int16"
                          },
                          "kind": "module"
                        }
                      ]
                    }
                  ]
                },
                {
                  "__type": "TableCell",
                  "__tag": 4069,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "InlineCode",
                          "__tag": 4051,
                          "value": "short"
                        }
                      ]
                    }
                  ]
                },
                {
                  "__type": "TableCell",
                  "__tag": 4069,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "Text",
                          "__tag": 4046,
                          "value": "Platform-defined integer type with 16 bits."
                        }
                      ]
                    }
                  ]
                }
              ]
            },
            {
              "__type": "TableRow",
              "__tag": 4068,
              "header": false,
              "children": [
                {
                  "__type": "TableCell",
                  "__tag": 4069,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "CrossRef",
                          "__tag": 4002,
                          "value": "numpy.uint16",
                          "reference": {
                            "__type": "RefInfo",
                            "__tag": 4000,
                            "module": "numpy",
                            "version": "*",
                            "kind": "api",
                            "path": "numpy:uint16"
                          },
                          "kind": "module"
                        }
                      ]
                    }
                  ]
                },
                {
                  "__type": "TableCell",
                  "__tag": 4069,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "CrossRef",
                          "__tag": 4002,
                          "value": "numpy.ushort",
                          "reference": {
                            "__type": "RefInfo",
                            "__tag": 4000,
                            "module": "numpy",
                            "version": "*",
                            "kind": "api",
                            "path": "numpy:uint16"
                          },
                          "kind": "module"
                        }
                      ]
                    }
                  ]
                },
                {
                  "__type": "TableCell",
                  "__tag": 4069,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "InlineCode",
                          "__tag": 4051,
                          "value": "unsigned short"
                        }
                      ]
                    }
                  ]
                },
                {
                  "__type": "TableCell",
                  "__tag": 4069,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "Text",
                          "__tag": 4046,
                          "value": "Platform-defined integer type with 16 bits without sign."
                        }
                      ]
                    }
                  ]
                }
              ]
            },
            {
              "__type": "TableRow",
              "__tag": 4068,
              "header": false,
              "children": [
                {
                  "__type": "TableCell",
                  "__tag": 4069,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "CrossRef",
                          "__tag": 4002,
                          "value": "numpy.int32",
                          "reference": {
                            "__type": "RefInfo",
                            "__tag": 4000,
                            "module": "numpy",
                            "version": "*",
                            "kind": "api",
                            "path": "numpy:int32"
                          },
                          "kind": "module"
                        }
                      ]
                    }
                  ]
                },
                {
                  "__type": "TableCell",
                  "__tag": 4069,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "CrossRef",
                          "__tag": 4002,
                          "value": "numpy.intc",
                          "reference": {
                            "__type": "RefInfo",
                            "__tag": 4000,
                            "module": "numpy",
                            "version": "*",
                            "kind": "api",
                            "path": "numpy:int32"
                          },
                          "kind": "module"
                        }
                      ]
                    }
                  ]
                },
                {
                  "__type": "TableCell",
                  "__tag": 4069,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "InlineCode",
                          "__tag": 4051,
                          "value": "int"
                        }
                      ]
                    }
                  ]
                },
                {
                  "__type": "TableCell",
                  "__tag": 4069,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "Text",
                          "__tag": 4046,
                          "value": "Platform-defined integer type with 32 bits."
                        }
                      ]
                    }
                  ]
                }
              ]
            },
            {
              "__type": "TableRow",
              "__tag": 4068,
              "header": false,
              "children": [
                {
                  "__type": "TableCell",
                  "__tag": 4069,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "CrossRef",
                          "__tag": 4002,
                          "value": "numpy.uint32",
                          "reference": {
                            "__type": "RefInfo",
                            "__tag": 4000,
                            "module": "numpy",
                            "version": "*",
                            "kind": "api",
                            "path": "numpy:uint32"
                          },
                          "kind": "module"
                        }
                      ]
                    }
                  ]
                },
                {
                  "__type": "TableCell",
                  "__tag": 4069,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "CrossRef",
                          "__tag": 4002,
                          "value": "numpy.uintc",
                          "reference": {
                            "__type": "RefInfo",
                            "__tag": 4000,
                            "module": "numpy",
                            "version": "*",
                            "kind": "api",
                            "path": "numpy:uint32"
                          },
                          "kind": "module"
                        }
                      ]
                    }
                  ]
                },
                {
                  "__type": "TableCell",
                  "__tag": 4069,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "InlineCode",
                          "__tag": 4051,
                          "value": "unsigned int"
                        }
                      ]
                    }
                  ]
                },
                {
                  "__type": "TableCell",
                  "__tag": 4069,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "Text",
                          "__tag": 4046,
                          "value": "Platform-defined integer type with 32 bits without sign."
                        }
                      ]
                    }
                  ]
                }
              ]
            },
            {
              "__type": "TableRow",
              "__tag": 4068,
              "header": false,
              "children": [
                {
                  "__type": "TableCell",
                  "__tag": 4069,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "CrossRef",
                          "__tag": 4002,
                          "value": "numpy.intp",
                          "reference": {
                            "__type": "RefInfo",
                            "__tag": 4000,
                            "module": "numpy",
                            "version": "*",
                            "kind": "api",
                            "path": "numpy:int64"
                          },
                          "kind": "module"
                        }
                      ]
                    }
                  ]
                },
                {
                  "__type": "TableCell",
                  "__tag": 4069,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "Text",
                          "__tag": 4046,
                          "value": "N/A"
                        }
                      ]
                    }
                  ]
                },
                {
                  "__type": "TableCell",
                  "__tag": 4069,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "InlineCode",
                          "__tag": 4051,
                          "value": "ssize_t"
                        },
                        {
                          "__type": "Text",
                          "__tag": 4046,
                          "value": "/"
                        },
                        {
                          "__type": "InlineCode",
                          "__tag": 4051,
                          "value": "Py_ssize_t"
                        }
                      ]
                    }
                  ]
                },
                {
                  "__type": "TableCell",
                  "__tag": 4069,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "Text",
                          "__tag": 4046,
                          "value": "Platform-defined integer of size "
                        },
                        {
                          "__type": "InlineCode",
                          "__tag": 4051,
                          "value": "size_t"
                        },
                        {
                          "__type": "Text",
                          "__tag": 4046,
                          "value": "; used e.g. for sizes."
                        }
                      ]
                    }
                  ]
                }
              ]
            },
            {
              "__type": "TableRow",
              "__tag": 4068,
              "header": false,
              "children": [
                {
                  "__type": "TableCell",
                  "__tag": 4069,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "CrossRef",
                          "__tag": 4002,
                          "value": "numpy.uintp",
                          "reference": {
                            "__type": "RefInfo",
                            "__tag": 4000,
                            "module": "numpy",
                            "version": "*",
                            "kind": "api",
                            "path": "numpy:uint64"
                          },
                          "kind": "module"
                        }
                      ]
                    }
                  ]
                },
                {
                  "__type": "TableCell",
                  "__tag": 4069,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "Text",
                          "__tag": 4046,
                          "value": "N/A"
                        }
                      ]
                    }
                  ]
                },
                {
                  "__type": "TableCell",
                  "__tag": 4069,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "InlineCode",
                          "__tag": 4051,
                          "value": "size_t"
                        }
                      ]
                    }
                  ]
                },
                {
                  "__type": "TableCell",
                  "__tag": 4069,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "Text",
                          "__tag": 4046,
                          "value": "Platform-defined integer type capable of storing the maximum     allocation size."
                        }
                      ]
                    }
                  ]
                }
              ]
            },
            {
              "__type": "TableRow",
              "__tag": 4068,
              "header": false,
              "children": [
                {
                  "__type": "TableCell",
                  "__tag": 4069,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "Text",
                          "__tag": 4046,
                          "value": "N/A"
                        }
                      ]
                    }
                  ]
                },
                {
                  "__type": "TableCell",
                  "__tag": 4069,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "InlineCode",
                          "__tag": 4051,
                          "value": "'p'"
                        }
                      ]
                    }
                  ]
                },
                {
                  "__type": "TableCell",
                  "__tag": 4069,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "InlineCode",
                          "__tag": 4051,
                          "value": "intptr_t"
                        }
                      ]
                    }
                  ]
                },
                {
                  "__type": "TableCell",
                  "__tag": 4069,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "Text",
                          "__tag": 4046,
                          "value": "Guaranteed to hold pointers. Character code only (Python and C)."
                        }
                      ]
                    }
                  ]
                }
              ]
            },
            {
              "__type": "TableRow",
              "__tag": 4068,
              "header": false,
              "children": [
                {
                  "__type": "TableCell",
                  "__tag": 4069,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "Text",
                          "__tag": 4046,
                          "value": "N/A"
                        }
                      ]
                    }
                  ]
                },
                {
                  "__type": "TableCell",
                  "__tag": 4069,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "InlineCode",
                          "__tag": 4051,
                          "value": "'P'"
                        }
                      ]
                    }
                  ]
                },
                {
                  "__type": "TableCell",
                  "__tag": 4069,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "InlineCode",
                          "__tag": 4051,
                          "value": "uintptr_t"
                        }
                      ]
                    }
                  ]
                },
                {
                  "__type": "TableCell",
                  "__tag": 4069,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "Text",
                          "__tag": 4046,
                          "value": "Guaranteed to hold pointers without sign. Character code only (Python and C)."
                        }
                      ]
                    }
                  ]
                }
              ]
            },
            {
              "__type": "TableRow",
              "__tag": 4068,
              "header": false,
              "children": [
                {
                  "__type": "TableCell",
                  "__tag": 4069,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "CrossRef",
                          "__tag": 4002,
                          "value": "numpy.int32",
                          "reference": {
                            "__type": "RefInfo",
                            "__tag": 4000,
                            "module": "numpy",
                            "version": "*",
                            "kind": "api",
                            "path": "numpy:int32"
                          },
                          "kind": "module"
                        },
                        {
                          "__type": "Text",
                          "__tag": 4046,
                          "value": " or "
                        },
                        {
                          "__type": "CrossRef",
                          "__tag": 4002,
                          "value": "numpy.int64",
                          "reference": {
                            "__type": "RefInfo",
                            "__tag": 4000,
                            "module": "numpy",
                            "version": "*",
                            "kind": "api",
                            "path": "numpy:int64"
                          },
                          "kind": "module"
                        }
                      ]
                    }
                  ]
                },
                {
                  "__type": "TableCell",
                  "__tag": 4069,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "CrossRef",
                          "__tag": 4002,
                          "value": "numpy.long",
                          "reference": {
                            "__type": "RefInfo",
                            "__tag": 4000,
                            "module": "numpy",
                            "version": "*",
                            "kind": "api",
                            "path": "numpy:int64"
                          },
                          "kind": "module"
                        }
                      ]
                    }
                  ]
                },
                {
                  "__type": "TableCell",
                  "__tag": 4069,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "InlineCode",
                          "__tag": 4051,
                          "value": "long"
                        }
                      ]
                    }
                  ]
                },
                {
                  "__type": "TableCell",
                  "__tag": 4069,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "Text",
                          "__tag": 4046,
                          "value": "Platform-defined integer type with at least 32 bits."
                        }
                      ]
                    }
                  ]
                }
              ]
            },
            {
              "__type": "TableRow",
              "__tag": 4068,
              "header": false,
              "children": [
                {
                  "__type": "TableCell",
                  "__tag": 4069,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "CrossRef",
                          "__tag": 4002,
                          "value": "numpy.uint32",
                          "reference": {
                            "__type": "RefInfo",
                            "__tag": 4000,
                            "module": "numpy",
                            "version": "*",
                            "kind": "api",
                            "path": "numpy:uint32"
                          },
                          "kind": "module"
                        },
                        {
                          "__type": "Text",
                          "__tag": 4046,
                          "value": " or "
                        },
                        {
                          "__type": "CrossRef",
                          "__tag": 4002,
                          "value": "numpy.uint64",
                          "reference": {
                            "__type": "RefInfo",
                            "__tag": 4000,
                            "module": "numpy",
                            "version": "*",
                            "kind": "api",
                            "path": "numpy:uint64"
                          },
                          "kind": "module"
                        }
                      ]
                    }
                  ]
                },
                {
                  "__type": "TableCell",
                  "__tag": 4069,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "CrossRef",
                          "__tag": 4002,
                          "value": "numpy.ulong",
                          "reference": {
                            "__type": "RefInfo",
                            "__tag": 4000,
                            "module": "numpy",
                            "version": "*",
                            "kind": "api",
                            "path": "numpy:uint64"
                          },
                          "kind": "module"
                        }
                      ]
                    }
                  ]
                },
                {
                  "__type": "TableCell",
                  "__tag": 4069,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "InlineCode",
                          "__tag": 4051,
                          "value": "unsigned long"
                        }
                      ]
                    }
                  ]
                },
                {
                  "__type": "TableCell",
                  "__tag": 4069,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "Text",
                          "__tag": 4046,
                          "value": "Platform-defined integer type with at least 32 bits without sign."
                        }
                      ]
                    }
                  ]
                }
              ]
            },
            {
              "__type": "TableRow",
              "__tag": 4068,
              "header": false,
              "children": [
                {
                  "__type": "TableCell",
                  "__tag": 4069,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "Text",
                          "__tag": 4046,
                          "value": "N/A"
                        }
                      ]
                    }
                  ]
                },
                {
                  "__type": "TableCell",
                  "__tag": 4069,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "CrossRef",
                          "__tag": 4002,
                          "value": "numpy.longlong",
                          "reference": {
                            "__type": "RefInfo",
                            "__tag": 4000,
                            "module": "numpy",
                            "version": "*",
                            "kind": "api",
                            "path": "numpy:longlong"
                          },
                          "kind": "module"
                        }
                      ]
                    }
                  ]
                },
                {
                  "__type": "TableCell",
                  "__tag": 4069,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "InlineCode",
                          "__tag": 4051,
                          "value": "long long"
                        }
                      ]
                    }
                  ]
                },
                {
                  "__type": "TableCell",
                  "__tag": 4069,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "Text",
                          "__tag": 4046,
                          "value": "Platform-defined integer type with at least 64 bits."
                        }
                      ]
                    }
                  ]
                }
              ]
            },
            {
              "__type": "TableRow",
              "__tag": 4068,
              "header": false,
              "children": [
                {
                  "__type": "TableCell",
                  "__tag": 4069,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "Text",
                          "__tag": 4046,
                          "value": "N/A"
                        }
                      ]
                    }
                  ]
                },
                {
                  "__type": "TableCell",
                  "__tag": 4069,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "CrossRef",
                          "__tag": 4002,
                          "value": "numpy.ulonglong",
                          "reference": {
                            "__type": "RefInfo",
                            "__tag": 4000,
                            "module": "numpy",
                            "version": "*",
                            "kind": "api",
                            "path": "numpy:ulonglong"
                          },
                          "kind": "module"
                        }
                      ]
                    }
                  ]
                },
                {
                  "__type": "TableCell",
                  "__tag": 4069,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "InlineCode",
                          "__tag": 4051,
                          "value": "unsigned long long"
                        }
                      ]
                    }
                  ]
                },
                {
                  "__type": "TableCell",
                  "__tag": 4069,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "Text",
                          "__tag": 4046,
                          "value": "Platform-defined integer type with at least 64 bits without sign."
                        }
                      ]
                    }
                  ]
                }
              ]
            },
            {
              "__type": "TableRow",
              "__tag": 4068,
              "header": false,
              "children": [
                {
                  "__type": "TableCell",
                  "__tag": 4069,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "CrossRef",
                          "__tag": 4002,
                          "value": "numpy.float16",
                          "reference": {
                            "__type": "RefInfo",
                            "__tag": 4000,
                            "module": "numpy",
                            "version": "*",
                            "kind": "api",
                            "path": "numpy:float16"
                          },
                          "kind": "module"
                        }
                      ]
                    }
                  ]
                },
                {
                  "__type": "TableCell",
                  "__tag": 4069,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "CrossRef",
                          "__tag": 4002,
                          "value": "numpy.half",
                          "reference": {
                            "__type": "RefInfo",
                            "__tag": 4000,
                            "module": "numpy",
                            "version": "*",
                            "kind": "api",
                            "path": "numpy:float16"
                          },
                          "kind": "module"
                        }
                      ]
                    }
                  ]
                },
                {
                  "__type": "TableCell",
                  "__tag": 4069,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "Text",
                          "__tag": 4046,
                          "value": "N/A"
                        }
                      ]
                    }
                  ]
                },
                {
                  "__type": "TableCell",
                  "__tag": 4069,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "Text",
                          "__tag": 4046,
                          "value": "Half precision float:     sign bit, 5 bits exponent, 10 bits mantissa."
                        }
                      ]
                    }
                  ]
                }
              ]
            },
            {
              "__type": "TableRow",
              "__tag": 4068,
              "header": false,
              "children": [
                {
                  "__type": "TableCell",
                  "__tag": 4069,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "CrossRef",
                          "__tag": 4002,
                          "value": "numpy.float32",
                          "reference": {
                            "__type": "RefInfo",
                            "__tag": 4000,
                            "module": "numpy",
                            "version": "*",
                            "kind": "api",
                            "path": "numpy:float32"
                          },
                          "kind": "module"
                        }
                      ]
                    }
                  ]
                },
                {
                  "__type": "TableCell",
                  "__tag": 4069,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "CrossRef",
                          "__tag": 4002,
                          "value": "numpy.single",
                          "reference": {
                            "__type": "RefInfo",
                            "__tag": 4000,
                            "module": "numpy",
                            "version": "*",
                            "kind": "api",
                            "path": "numpy:float32"
                          },
                          "kind": "module"
                        }
                      ]
                    }
                  ]
                },
                {
                  "__type": "TableCell",
                  "__tag": 4069,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "InlineCode",
                          "__tag": 4051,
                          "value": "float"
                        }
                      ]
                    }
                  ]
                },
                {
                  "__type": "TableCell",
                  "__tag": 4069,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "Text",
                          "__tag": 4046,
                          "value": "Platform-defined single precision float:     typically sign bit, 8 bits exponent, 23 bits mantissa."
                        }
                      ]
                    }
                  ]
                }
              ]
            },
            {
              "__type": "TableRow",
              "__tag": 4068,
              "header": false,
              "children": [
                {
                  "__type": "TableCell",
                  "__tag": 4069,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "CrossRef",
                          "__tag": 4002,
                          "value": "numpy.float64",
                          "reference": {
                            "__type": "RefInfo",
                            "__tag": 4000,
                            "module": "numpy",
                            "version": "*",
                            "kind": "api",
                            "path": "numpy:float64"
                          },
                          "kind": "module"
                        }
                      ]
                    }
                  ]
                },
                {
                  "__type": "TableCell",
                  "__tag": 4069,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "CrossRef",
                          "__tag": 4002,
                          "value": "numpy.double",
                          "reference": {
                            "__type": "RefInfo",
                            "__tag": 4000,
                            "module": "numpy",
                            "version": "*",
                            "kind": "api",
                            "path": "numpy:float64"
                          },
                          "kind": "module"
                        }
                      ]
                    }
                  ]
                },
                {
                  "__type": "TableCell",
                  "__tag": 4069,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "InlineCode",
                          "__tag": 4051,
                          "value": "double"
                        }
                      ]
                    }
                  ]
                },
                {
                  "__type": "TableCell",
                  "__tag": 4069,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "Text",
                          "__tag": 4046,
                          "value": "Platform-defined double precision float:     typically sign bit, 11 bits exponent, 52 bits mantissa."
                        }
                      ]
                    }
                  ]
                }
              ]
            },
            {
              "__type": "TableRow",
              "__tag": 4068,
              "header": false,
              "children": [
                {
                  "__type": "TableCell",
                  "__tag": 4069,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "InlineCode",
                          "__tag": 4051,
                          "value": "numpy.float96"
                        },
                        {
                          "__type": "Text",
                          "__tag": 4046,
                          "value": " or "
                        },
                        {
                          "__type": "CrossRef",
                          "__tag": 4002,
                          "value": "numpy.float128",
                          "reference": {
                            "__type": "RefInfo",
                            "__tag": 4000,
                            "module": "numpy",
                            "version": "*",
                            "kind": "api",
                            "path": "numpy:longdouble"
                          },
                          "kind": "module"
                        }
                      ]
                    }
                  ]
                },
                {
                  "__type": "TableCell",
                  "__tag": 4069,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "CrossRef",
                          "__tag": 4002,
                          "value": "numpy.longdouble",
                          "reference": {
                            "__type": "RefInfo",
                            "__tag": 4000,
                            "module": "numpy",
                            "version": "*",
                            "kind": "api",
                            "path": "numpy:longdouble"
                          },
                          "kind": "module"
                        }
                      ]
                    }
                  ]
                },
                {
                  "__type": "TableCell",
                  "__tag": 4069,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "InlineCode",
                          "__tag": 4051,
                          "value": "long double"
                        }
                      ]
                    }
                  ]
                },
                {
                  "__type": "TableCell",
                  "__tag": 4069,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "Text",
                          "__tag": 4046,
                          "value": "Platform-defined extended-precision float."
                        }
                      ]
                    }
                  ]
                }
              ]
            },
            {
              "__type": "TableRow",
              "__tag": 4068,
              "header": false,
              "children": [
                {
                  "__type": "TableCell",
                  "__tag": 4069,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "CrossRef",
                          "__tag": 4002,
                          "value": "numpy.complex64",
                          "reference": {
                            "__type": "RefInfo",
                            "__tag": 4000,
                            "module": "numpy",
                            "version": "*",
                            "kind": "api",
                            "path": "numpy:complex64"
                          },
                          "kind": "module"
                        }
                      ]
                    }
                  ]
                },
                {
                  "__type": "TableCell",
                  "__tag": 4069,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "CrossRef",
                          "__tag": 4002,
                          "value": "numpy.csingle",
                          "reference": {
                            "__type": "RefInfo",
                            "__tag": 4000,
                            "module": "numpy",
                            "version": "*",
                            "kind": "api",
                            "path": "numpy:complex64"
                          },
                          "kind": "module"
                        }
                      ]
                    }
                  ]
                },
                {
                  "__type": "TableCell",
                  "__tag": 4069,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "InlineCode",
                          "__tag": 4051,
                          "value": "float complex"
                        }
                      ]
                    }
                  ]
                },
                {
                  "__type": "TableCell",
                  "__tag": 4069,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "Text",
                          "__tag": 4046,
                          "value": "Complex number, represented by two single-precision floats (real and imaginary components)."
                        }
                      ]
                    }
                  ]
                }
              ]
            },
            {
              "__type": "TableRow",
              "__tag": 4068,
              "header": false,
              "children": [
                {
                  "__type": "TableCell",
                  "__tag": 4069,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "CrossRef",
                          "__tag": 4002,
                          "value": "numpy.complex128",
                          "reference": {
                            "__type": "RefInfo",
                            "__tag": 4000,
                            "module": "numpy",
                            "version": "*",
                            "kind": "api",
                            "path": "numpy:complex128"
                          },
                          "kind": "module"
                        }
                      ]
                    }
                  ]
                },
                {
                  "__type": "TableCell",
                  "__tag": 4069,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "CrossRef",
                          "__tag": 4002,
                          "value": "numpy.cdouble",
                          "reference": {
                            "__type": "RefInfo",
                            "__tag": 4000,
                            "module": "numpy",
                            "version": "*",
                            "kind": "api",
                            "path": "numpy:complex128"
                          },
                          "kind": "module"
                        }
                      ]
                    }
                  ]
                },
                {
                  "__type": "TableCell",
                  "__tag": 4069,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "InlineCode",
                          "__tag": 4051,
                          "value": "double complex"
                        }
                      ]
                    }
                  ]
                },
                {
                  "__type": "TableCell",
                  "__tag": 4069,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "Text",
                          "__tag": 4046,
                          "value": "Complex number, represented by two double-precision floats (real and imaginary components)."
                        }
                      ]
                    }
                  ]
                }
              ]
            },
            {
              "__type": "TableRow",
              "__tag": 4068,
              "header": false,
              "children": [
                {
                  "__type": "TableCell",
                  "__tag": 4069,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "InlineCode",
                          "__tag": 4051,
                          "value": "numpy.complex192"
                        },
                        {
                          "__type": "Text",
                          "__tag": 4046,
                          "value": " or "
                        },
                        {
                          "__type": "CrossRef",
                          "__tag": 4002,
                          "value": "numpy.complex256",
                          "reference": {
                            "__type": "RefInfo",
                            "__tag": 4000,
                            "module": "numpy",
                            "version": "*",
                            "kind": "api",
                            "path": "numpy:clongdouble"
                          },
                          "kind": "module"
                        }
                      ]
                    }
                  ]
                },
                {
                  "__type": "TableCell",
                  "__tag": 4069,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "CrossRef",
                          "__tag": 4002,
                          "value": "numpy.clongdouble",
                          "reference": {
                            "__type": "RefInfo",
                            "__tag": 4000,
                            "module": "numpy",
                            "version": "*",
                            "kind": "api",
                            "path": "numpy:clongdouble"
                          },
                          "kind": "module"
                        }
                      ]
                    }
                  ]
                },
                {
                  "__type": "TableCell",
                  "__tag": 4069,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "InlineCode",
                          "__tag": 4051,
                          "value": "long double complex"
                        }
                      ]
                    }
                  ]
                },
                {
                  "__type": "TableCell",
                  "__tag": 4069,
                  "children": [
                    {
                      "__type": "Paragraph",
                      "__tag": 4045,
                      "children": [
                        {
                          "__type": "Text",
                          "__tag": 4046,
                          "value": "Complex number, represented by two extended-precision floats (real and imaginary components)."
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "Since many of these have platform-dependent definitions, a set of fixed-size aliases are provided (See "
            },
            {
              "__type": "CrossRef",
              "__tag": 4002,
              "value": "sized-aliases",
              "reference": {
                "__type": "LocalRef",
                "__tag": 4022,
                "kind": "docs",
                "path": "reference:arrays.scalars"
              },
              "kind": "exists"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ")."
            }
          ]
        }
      ],
      "title": [
        {
          "__type": "Text",
          "__tag": 4046,
          "value": "Relationship Between NumPy Data Types and C Data Types"
        }
      ],
      "level": 1,
      "target": "canonical-python-and-c-types"
    },
    {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "NumPy generally returns elements of arrays as array scalars (a scalar with an associated dtype).  Array scalars differ from Python scalars, but for the most part they can be used interchangeably (the primary exception is for versions of Python older than v2.x, where integer array scalars cannot act as indices for lists and tuples).  There are some exceptions, such as when code requires very specific attributes of a scalar or when it checks specifically whether a value is a Python scalar. Generally, problems are easily fixed by explicitly converting array scalars to Python scalars, using the corresponding Python type function (e.g., "
            },
            {
              "__type": "InlineRole",
              "__tag": 4003,
              "value": "int",
              "domain": null,
              "role": "class",
              "inventory": null
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ", "
            },
            {
              "__type": "InlineRole",
              "__tag": 4003,
              "value": "float",
              "domain": null,
              "role": "class",
              "inventory": null
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ", "
            },
            {
              "__type": "InlineRole",
              "__tag": 4003,
              "value": "complex",
              "domain": null,
              "role": "class",
              "inventory": null
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ", "
            },
            {
              "__type": "InlineRole",
              "__tag": 4003,
              "value": "str",
              "domain": null,
              "role": "class",
              "inventory": null
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ")."
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "The primary advantage of using array scalars is that they preserve the array type (Python may not have a matching scalar type available, e.g. "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "int16"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ").  Therefore, the use of array scalars ensures identical behaviour between arrays and scalars, irrespective of whether the value is inside an array or not.  NumPy scalars also have many of the same methods arrays do."
            }
          ]
        }
      ],
      "title": [
        {
          "__type": "Text",
          "__tag": 4046,
          "value": "Array scalars"
        }
      ],
      "level": 1,
      "target": null
    },
    {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "The fixed size of NumPy numeric types may cause overflow errors when a value requires more memory than available in the data type. For example, "
            },
            {
              "__type": "CrossRef",
              "__tag": 4002,
              "value": "numpy.power",
              "reference": {
                "__type": "RefInfo",
                "__tag": 4000,
                "module": "numpy",
                "version": "*",
                "kind": "api",
                "path": "numpy:power"
              },
              "kind": "module"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " evaluates "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "100 ** 9"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " correctly for 64-bit integers, but gives -1486618624 (incorrect) for a 32-bit integer."
            }
          ]
        },
        {
          "__type": "Blockquote",
          "__tag": 4059,
          "children": [
            {
              "__type": "Code",
              "__tag": 4050,
              "value": ">>> np.power(100, 9, dtype=np.int64)\n1000000000000000000\n>>> np.power(100, 9, dtype=np.int32)\nnp.int32(-1486618624)",
              "execution_status": null
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "The behaviour of NumPy and Python integer types differs significantly for integer overflows and may confuse users expecting NumPy integers to behave similar to Python's "
            },
            {
              "__type": "InlineRole",
              "__tag": 4003,
              "value": "int",
              "domain": null,
              "role": "class",
              "inventory": null
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ". Unlike NumPy, the size of Python's "
            },
            {
              "__type": "InlineRole",
              "__tag": 4003,
              "value": "int",
              "domain": null,
              "role": "class",
              "inventory": null
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " is flexible. This means Python integers may expand to accommodate any integer and will not overflow."
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "NumPy provides "
            },
            {
              "__type": "CrossRef",
              "__tag": 4002,
              "value": "numpy.iinfo",
              "reference": {
                "__type": "RefInfo",
                "__tag": 4000,
                "module": "numpy",
                "version": "*",
                "kind": "api",
                "path": "numpy:iinfo"
              },
              "kind": "module"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " and "
            },
            {
              "__type": "CrossRef",
              "__tag": 4002,
              "value": "numpy.finfo",
              "reference": {
                "__type": "RefInfo",
                "__tag": 4000,
                "module": "numpy",
                "version": "*",
                "kind": "api",
                "path": "numpy:finfo"
              },
              "kind": "module"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " to verify the minimum or maximum values of NumPy integer and floating point values respectively       "
            }
          ]
        },
        {
          "__type": "Code",
          "__tag": 4050,
          "value": ">>> np.iinfo(int) # Bounds of the default integer on this system.\niinfo(min=-9223372036854775808, max=9223372036854775807, dtype=int64)\n>>> np.iinfo(np.int32) # Bounds of a 32-bit integer\niinfo(min=-2147483648, max=2147483647, dtype=int32)\n>>> np.iinfo(np.int64) # Bounds of a 64-bit integer\niinfo(min=-9223372036854775808, max=9223372036854775807, dtype=int64)",
          "execution_status": null
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "If 64-bit integers are still too small the result may be cast to a floating point number. Floating point numbers offer a larger, but inexact, range of possible values."
            }
          ]
        },
        {
          "__type": "Blockquote",
          "__tag": 4059,
          "children": [
            {
              "__type": "Code",
              "__tag": 4050,
              "value": ">>> np.power(100, 100, dtype=np.int64) # Incorrect even with 64-bit int\n0\n>>> np.power(100, 100, dtype=np.float64)\n1e+200",
              "execution_status": null
            }
          ]
        }
      ],
      "title": [
        {
          "__type": "Text",
          "__tag": 4046,
          "value": "Overflow errors"
        }
      ],
      "level": 1,
      "target": "overflow-errors"
    },
    {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "Many functions in NumPy, especially those in "
            },
            {
              "__type": "CrossRef",
              "__tag": 4002,
              "value": "numpy.linalg",
              "reference": {
                "__type": "RefInfo",
                "__tag": 4000,
                "module": "numpy",
                "version": "*",
                "kind": "api",
                "path": "numpy.linalg"
              },
              "kind": "module"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ", involve floating-point arithmetic, which can introduce small inaccuracies due to the way computers  represent decimal numbers. For instance, when performing basic arithmetic operations  involving floating-point numbers:"
            }
          ]
        },
        {
          "__type": "Blockquote",
          "__tag": 4059,
          "children": [
            {
              "__type": "Code",
              "__tag": 4050,
              "value": ">>> 0.3 - 0.2 - 0.1  # This does not equal 0 due to floating-point precision\n-2.7755575615628914e-17",
              "execution_status": null
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "To handle such cases, it's advisable to use functions like "
            },
            {
              "__type": "InlineRole",
              "__tag": 4003,
              "value": "np.isclose",
              "domain": null,
              "role": null,
              "inventory": null
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " to compare  values, rather than checking for exact equality:"
            }
          ]
        },
        {
          "__type": "Blockquote",
          "__tag": 4059,
          "children": [
            {
              "__type": "Code",
              "__tag": 4050,
              "value": ">>> np.isclose(0.3 - 0.2 - 0.1, 0, rtol=1e-05)  # Check for closeness to 0\nTrue",
              "execution_status": null
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "In this example, "
            },
            {
              "__type": "InlineRole",
              "__tag": 4003,
              "value": "np.isclose",
              "domain": null,
              "role": null,
              "inventory": null
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " accounts for the minor inaccuracies that occur in  floating-point calculations by applying a relative tolerance, ensuring that results within a small threshold are considered close."
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "For information about precision in calculations, see "
            },
            {
              "__type": "Link",
              "__tag": 4049,
              "children": [
                {
                  "__type": "Text",
                  "__tag": 4046,
                  "value": "Floating-Point Arithmetic"
                }
              ],
              "url": "https://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html",
              "title": ""
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "."
            }
          ]
        }
      ],
      "title": [
        {
          "__type": "Text",
          "__tag": 4046,
          "value": "Floating point precision"
        }
      ],
      "level": 1,
      "target": null
    },
    {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "Python's floating-point numbers are usually 64-bit floating-point numbers, nearly equivalent to "
            },
            {
              "__type": "CrossRef",
              "__tag": 4002,
              "value": "numpy.float64",
              "reference": {
                "__type": "RefInfo",
                "__tag": 4000,
                "module": "numpy",
                "version": "*",
                "kind": "api",
                "path": "numpy:float64"
              },
              "kind": "module"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ". In some unusual situations it may be useful to use floating-point numbers with more precision. Whether this is possible in numpy depends on the hardware and on the development environment: specifically, x86 machines provide hardware floating-point with 80-bit precision, and while most C compilers provide this as their "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "long double"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " type, MSVC (standard for Windows builds) makes "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "long double"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " identical to "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "double"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " (64 bits). NumPy makes the compiler's "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "long double"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " available as "
            },
            {
              "__type": "CrossRef",
              "__tag": 4002,
              "value": "numpy.longdouble",
              "reference": {
                "__type": "RefInfo",
                "__tag": 4000,
                "module": "numpy",
                "version": "*",
                "kind": "api",
                "path": "numpy:longdouble"
              },
              "kind": "module"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " (and "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "np.clongdouble"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " for the complex numbers). You can find out what your numpy provides with "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "np.finfo(np.longdouble)"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "."
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "NumPy does not provide a dtype with more precision than C's "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "long double"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "; in particular, the 128-bit IEEE quad precision data type (FORTRAN's "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "REAL*16"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ") is not available."
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "For efficient memory alignment, "
            },
            {
              "__type": "CrossRef",
              "__tag": 4002,
              "value": "numpy.longdouble",
              "reference": {
                "__type": "RefInfo",
                "__tag": 4000,
                "module": "numpy",
                "version": "*",
                "kind": "api",
                "path": "numpy:longdouble"
              },
              "kind": "module"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " is usually stored padded with zero bits, either to 96 or 128 bits. Which is more efficient depends on hardware and development environment; typically on 32-bit systems they are padded to 96 bits, while on 64-bit systems they are typically padded to 128 bits. "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "np.longdouble"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " is padded to the system default; "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "np.float96"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " and "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "np.float128"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " are provided for users who want specific padding. In spite of the names, "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "np.float96"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " and "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "np.float128"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " provide only as much precision as "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "np.longdouble"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ", that is, 80 bits on most x86 machines and 64 bits in standard Windows builds."
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "Be warned that even if "
            },
            {
              "__type": "CrossRef",
              "__tag": 4002,
              "value": "numpy.longdouble",
              "reference": {
                "__type": "RefInfo",
                "__tag": 4000,
                "module": "numpy",
                "version": "*",
                "kind": "api",
                "path": "numpy:longdouble"
              },
              "kind": "module"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " offers more precision than python "
            },
            {
              "__type": "InlineRole",
              "__tag": 4003,
              "value": "float",
              "domain": null,
              "role": "class",
              "inventory": null
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ", it is easy to lose that extra precision, since python often forces values to pass through "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "float"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ". For example, the "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "%"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " formatting operator requires its arguments to be converted to standard python types, and it is therefore impossible to preserve extended precision even if many decimal places are requested. It can be useful to test your code with the value "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "1 + np.finfo(np.longdouble).eps"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "."
            }
          ]
        }
      ],
      "title": [
        {
          "__type": "Text",
          "__tag": 4046,
          "value": "Extended precision"
        }
      ],
      "level": 1,
      "target": null
    }
  ],
  "local_refs": []
}