{
  "__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": "reference:maskedarray.baseclass",
  "arbitrary": [
    {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [],
      "level": 0,
      "target": null
    },
    {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "In addition to the "
            },
            {
              "__type": "InlineRole",
              "__tag": 4003,
              "value": "MaskedArray",
              "domain": null,
              "role": "class",
              "inventory": null
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " class, the "
            },
            {
              "__type": "CrossRef",
              "__tag": 4002,
              "value": "numpy.ma",
              "reference": {
                "__type": "RefInfo",
                "__tag": 4000,
                "module": "numpy",
                "version": "*",
                "kind": "api",
                "path": "numpy.ma"
              },
              "kind": "module"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " module defines several constants."
            }
          ]
        }
      ],
      "title": [
        {
          "__type": "Text",
          "__tag": 4046,
          "value": "Constants of the "
        },
        {
          "__type": "InlineRole",
          "__tag": 4003,
          "value": "numpy.ma",
          "domain": null,
          "role": "mod",
          "inventory": null
        },
        {
          "__type": "Text",
          "__tag": 4046,
          "value": " module"
        }
      ],
      "level": 0,
      "target": "numpy.ma.constants"
    },
    {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "A subclass of "
            },
            {
              "__type": "CrossRef",
              "__tag": 4002,
              "value": "ndarray",
              "reference": {
                "__type": "RefInfo",
                "__tag": 4000,
                "module": "numpy",
                "version": "*",
                "kind": "api",
                "path": "numpy:ndarray"
              },
              "kind": "module"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " designed to manipulate numerical arrays with missing data."
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "An instance of "
            },
            {
              "__type": "InlineRole",
              "__tag": 4003,
              "value": "MaskedArray",
              "domain": null,
              "role": "class",
              "inventory": null
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " can be thought as the combination of several elements:"
            }
          ]
        },
        {
          "__type": "BulletList",
          "__tag": 4053,
          "ordered": false,
          "start": 1,
          "children": [
            {
              "__type": "ListItem",
              "__tag": 4054,
              "children": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "The "
                    },
                    {
                      "__type": "InlineRole",
                      "__tag": 4003,
                      "value": "~MaskedArray.data",
                      "domain": null,
                      "role": "attr",
                      "inventory": null
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ", as a regular "
                    },
                    {
                      "__type": "CrossRef",
                      "__tag": 4002,
                      "value": "numpy.ndarray",
                      "reference": {
                        "__type": "RefInfo",
                        "__tag": 4000,
                        "module": "numpy",
                        "version": "*",
                        "kind": "api",
                        "path": "numpy:ndarray"
                      },
                      "kind": "module"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " of any shape or datatype (the data)."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "ListItem",
              "__tag": 4054,
              "children": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "A boolean "
                    },
                    {
                      "__type": "InlineRole",
                      "__tag": 4003,
                      "value": "~numpy.ma.MaskedArray.mask",
                      "domain": null,
                      "role": "attr",
                      "inventory": null
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " with the same shape as the data, where a "
                    },
                    {
                      "__type": "InlineCode",
                      "__tag": 4051,
                      "value": "True"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " value indicates that the corresponding element of the data is invalid.   The special value "
                    },
                    {
                      "__type": "InlineRole",
                      "__tag": 4003,
                      "value": "nomask",
                      "domain": null,
                      "role": "const",
                      "inventory": null
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": " is also acceptable for arrays without named fields, and indicates that no data is invalid."
                    }
                  ]
                }
              ]
            },
            {
              "__type": "ListItem",
              "__tag": 4054,
              "children": [
                {
                  "__type": "Paragraph",
                  "__tag": 4045,
                  "children": [
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "A "
                    },
                    {
                      "__type": "InlineRole",
                      "__tag": 4003,
                      "value": "~numpy.ma.MaskedArray.fill_value",
                      "domain": null,
                      "role": "attr",
                      "inventory": null
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": ", a value that may be used to replace the invalid entries in order to return a standard "
                    },
                    {
                      "__type": "CrossRef",
                      "__tag": 4002,
                      "value": "numpy.ndarray",
                      "reference": {
                        "__type": "RefInfo",
                        "__tag": 4000,
                        "module": "numpy",
                        "version": "*",
                        "kind": "api",
                        "path": "numpy:ndarray"
                      },
                      "kind": "module"
                    },
                    {
                      "__type": "Text",
                      "__tag": 4046,
                      "value": "."
                    }
                  ]
                }
              ]
            }
          ]
        }
      ],
      "title": [
        {
          "__type": "Text",
          "__tag": 4046,
          "value": "The "
        },
        {
          "__type": "InlineRole",
          "__tag": 4003,
          "value": "MaskedArray",
          "domain": null,
          "role": "class",
          "inventory": null
        },
        {
          "__type": "Text",
          "__tag": 4046,
          "value": " class"
        }
      ],
      "level": 0,
      "target": "maskedarray.baseclass"
    },
    {
      "__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:`Array Attributes <arrays.ndarray.attributes>`"
                }
              ]
            }
          ]
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "As "
            },
            {
              "__type": "InlineRole",
              "__tag": 4003,
              "value": "MaskedArray",
              "domain": null,
              "role": "class",
              "inventory": null
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " is a subclass of "
            },
            {
              "__type": "CrossRef",
              "__tag": 4002,
              "value": "ndarray",
              "reference": {
                "__type": "RefInfo",
                "__tag": 4000,
                "module": "numpy",
                "version": "*",
                "kind": "api",
                "path": "numpy:ndarray"
              },
              "kind": "module"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ", a masked array also inherits all the attributes and properties of a  "
            },
            {
              "__type": "CrossRef",
              "__tag": 4002,
              "value": "ndarray",
              "reference": {
                "__type": "RefInfo",
                "__tag": 4000,
                "module": "numpy",
                "version": "*",
                "kind": "api",
                "path": "numpy:ndarray"
              },
              "kind": "module"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " instance."
            }
          ]
        },
        {
          "__type": "Code",
          "__tag": 4050,
          "value": ".. autosummary:: \n    :toctree:generated/\n    MaskedArray.base\n    MaskedArray.ctypes\n    MaskedArray.dtype\n    MaskedArray.flags\n\n    MaskedArray.itemsize\n    MaskedArray.nbytes\n    MaskedArray.ndim\n    MaskedArray.shape\n    MaskedArray.size\n    MaskedArray.strides\n\n    MaskedArray.imag\n    MaskedArray.real\n\n    MaskedArray.flat\n    MaskedArray.__array_priority__",
          "execution_status": null
        }
      ],
      "title": [
        {
          "__type": "Text",
          "__tag": 4046,
          "value": "Attributes and properties of masked arrays"
        }
      ],
      "level": 1,
      "target": "ma-attributes"
    },
    {
      "__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:`Array methods <array.ndarray.methods>`"
                }
              ]
            }
          ]
        }
      ],
      "title": [
        {
          "__type": "InlineRole",
          "__tag": 4003,
          "value": "MaskedArray",
          "domain": null,
          "role": "class",
          "inventory": null
        },
        {
          "__type": "Text",
          "__tag": 4046,
          "value": " methods"
        }
      ],
      "level": 0,
      "target": null
    },
    {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Code",
          "__tag": 4050,
          "value": ".. autosummary:: \n    :toctree:generated/\n    MaskedArray.__float__\n    MaskedArray.__int__\n\n    MaskedArray.view\n    MaskedArray.astype\n    MaskedArray.byteswap\n\n    MaskedArray.compressed\n    MaskedArray.filled\n    MaskedArray.tofile\n    MaskedArray.toflex\n    MaskedArray.tolist\n    MaskedArray.torecords\n    MaskedArray.tobytes",
          "execution_status": null
        }
      ],
      "title": [
        {
          "__type": "Text",
          "__tag": 4046,
          "value": "Conversion"
        }
      ],
      "level": 1,
      "target": null
    },
    {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "For reshape, resize, and transpose, the single tuple argument may be replaced with "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "n"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " integers which will be interpreted as an n-tuple."
            }
          ]
        },
        {
          "__type": "Code",
          "__tag": 4050,
          "value": ".. autosummary:: \n    :toctree:generated/\n    MaskedArray.flatten\n    MaskedArray.ravel\n    MaskedArray.reshape\n    MaskedArray.resize\n    MaskedArray.squeeze\n    MaskedArray.swapaxes\n    MaskedArray.transpose\n    MaskedArray.T",
          "execution_status": null
        }
      ],
      "title": [
        {
          "__type": "Text",
          "__tag": 4046,
          "value": "Shape manipulation"
        }
      ],
      "level": 1,
      "target": null
    },
    {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "For array methods that take an "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "axis"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " keyword, it defaults to None. If axis is None, then the array is treated as a 1-D array. Any other value for "
            },
            {
              "__type": "InlineCode",
              "__tag": 4051,
              "value": "axis"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": " represents the dimension along which the operation should proceed."
            }
          ]
        },
        {
          "__type": "Code",
          "__tag": 4050,
          "value": ".. autosummary:: \n    :toctree:generated/\n    MaskedArray.argmax\n    MaskedArray.argmin\n    MaskedArray.argsort\n    MaskedArray.choose\n    MaskedArray.compress\n    MaskedArray.diagonal\n    MaskedArray.fill\n    MaskedArray.item\n    MaskedArray.nonzero\n    MaskedArray.put\n    MaskedArray.repeat\n    MaskedArray.searchsorted\n    MaskedArray.sort\n    MaskedArray.take",
          "execution_status": null
        }
      ],
      "title": [
        {
          "__type": "Text",
          "__tag": 4046,
          "value": "Item selection and manipulation"
        }
      ],
      "level": 1,
      "target": null
    },
    {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Code",
          "__tag": 4050,
          "value": ".. autosummary:: \n    :toctree:generated/\n    MaskedArray.copy\n    MaskedArray.dump\n    MaskedArray.dumps",
          "execution_status": null
        }
      ],
      "title": [
        {
          "__type": "Text",
          "__tag": 4046,
          "value": "Pickling and copy"
        }
      ],
      "level": 1,
      "target": null
    },
    {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Code",
          "__tag": 4050,
          "value": ".. autosummary:: \n    :toctree:generated/\n    MaskedArray.all\n    MaskedArray.anom\n    MaskedArray.any\n    MaskedArray.clip\n    MaskedArray.conj\n    MaskedArray.conjugate\n    MaskedArray.cumprod\n    MaskedArray.cumsum\n    MaskedArray.max\n    MaskedArray.mean\n    MaskedArray.min\n    MaskedArray.prod\n    MaskedArray.product\n    MaskedArray.ptp\n    MaskedArray.round\n    MaskedArray.std\n    MaskedArray.sum\n    MaskedArray.trace\n    MaskedArray.var",
          "execution_status": null
        }
      ],
      "title": [
        {
          "__type": "Text",
          "__tag": 4046,
          "value": "Calculations"
        }
      ],
      "level": 1,
      "target": null
    },
    {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [
        {
          "__type": "Text",
          "__tag": 4046,
          "value": "Arithmetic and comparison operations"
        }
      ],
      "level": 1,
      "target": null
    },
    {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Code",
          "__tag": 4050,
          "value": ".. autosummary:: \n    :toctree:generated/\n    MaskedArray.__lt__\n    MaskedArray.__le__\n    MaskedArray.__gt__\n    MaskedArray.__ge__\n    MaskedArray.__eq__\n    MaskedArray.__ne__",
          "execution_status": null
        }
      ],
      "title": [
        {
          "__type": "Text",
          "__tag": 4046,
          "value": "Comparison operators:"
        }
      ],
      "level": 2,
      "target": null
    },
    {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Code",
          "__tag": 4050,
          "value": ".. autosummary:: \n    :toctree:generated/\n    MaskedArray.__bool__",
          "execution_status": null
        }
      ],
      "title": [
        {
          "__type": "Text",
          "__tag": 4046,
          "value": "Truth value of an array ("
        },
        {
          "__type": "InlineRole",
          "__tag": 4003,
          "value": "bool() <bool>",
          "domain": null,
          "role": "class",
          "inventory": null
        },
        {
          "__type": "Text",
          "__tag": 4046,
          "value": "):"
        }
      ],
      "level": 2,
      "target": null
    },
    {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Code",
          "__tag": 4050,
          "value": ".. autosummary:: \n    :toctree:generated/\n    MaskedArray.__abs__\n    MaskedArray.__add__\n    MaskedArray.__radd__\n    MaskedArray.__sub__\n    MaskedArray.__rsub__\n    MaskedArray.__mul__\n    MaskedArray.__rmul__\n    MaskedArray.__truediv__\n    MaskedArray.__rtruediv__\n    MaskedArray.__floordiv__\n    MaskedArray.__rfloordiv__\n    MaskedArray.__mod__\n    MaskedArray.__rmod__\n    MaskedArray.__divmod__\n    MaskedArray.__rdivmod__\n    MaskedArray.__pow__\n    MaskedArray.__rpow__\n    MaskedArray.__lshift__\n    MaskedArray.__rlshift__\n    MaskedArray.__rshift__\n    MaskedArray.__rrshift__\n    MaskedArray.__and__\n    MaskedArray.__rand__\n    MaskedArray.__or__\n    MaskedArray.__ror__\n    MaskedArray.__xor__\n    MaskedArray.__rxor__",
          "execution_status": null
        }
      ],
      "title": [
        {
          "__type": "Text",
          "__tag": 4046,
          "value": "Arithmetic:"
        }
      ],
      "level": 2,
      "target": null
    },
    {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Code",
          "__tag": 4050,
          "value": ".. autosummary:: \n    :toctree:generated/\n    MaskedArray.__iadd__\n    MaskedArray.__isub__\n    MaskedArray.__imul__\n    MaskedArray.__itruediv__\n    MaskedArray.__ifloordiv__\n    MaskedArray.__imod__\n    MaskedArray.__ipow__\n    MaskedArray.__ilshift__\n    MaskedArray.__irshift__\n    MaskedArray.__iand__\n    MaskedArray.__ior__\n    MaskedArray.__ixor__",
          "execution_status": null
        }
      ],
      "title": [
        {
          "__type": "Text",
          "__tag": 4046,
          "value": "Arithmetic, in-place:"
        }
      ],
      "level": 2,
      "target": null
    },
    {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Code",
          "__tag": 4050,
          "value": ".. autosummary:: \n    :toctree:generated/\n    MaskedArray.__repr__\n    MaskedArray.__str__\n\n    MaskedArray.ids\n    MaskedArray.iscontiguous",
          "execution_status": null
        }
      ],
      "title": [
        {
          "__type": "Text",
          "__tag": 4046,
          "value": "Representation"
        }
      ],
      "level": 1,
      "target": null
    },
    {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "For standard library functions:"
            }
          ]
        },
        {
          "__type": "Code",
          "__tag": 4050,
          "value": ".. autosummary:: \n    :toctree:generated/\n    MaskedArray.__copy__\n    MaskedArray.__deepcopy__\n    MaskedArray.__getstate__\n    MaskedArray.__reduce__\n    MaskedArray.__setstate__",
          "execution_status": null
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "Basic customization:"
            }
          ]
        },
        {
          "__type": "Code",
          "__tag": 4050,
          "value": ".. autosummary:: \n    :toctree:generated/\n    MaskedArray.__new__\n    MaskedArray.__array__\n    MaskedArray.__array_wrap__",
          "execution_status": null
        },
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "Container customization: (see "
            },
            {
              "__type": "CrossRef",
              "__tag": 4002,
              "value": "Indexing",
              "reference": {
                "__type": "LocalRef",
                "__tag": 4022,
                "kind": "docs",
                "path": "reference:routines.indexing"
              },
              "kind": "exists"
            },
            {
              "__type": "Text",
              "__tag": 4046,
              "value": ")"
            }
          ]
        },
        {
          "__type": "Code",
          "__tag": 4050,
          "value": ".. autosummary:: \n    :toctree:generated/\n    MaskedArray.__len__\n    MaskedArray.__getitem__\n    MaskedArray.__setitem__\n    MaskedArray.__delitem__\n    MaskedArray.__contains__",
          "execution_status": null
        }
      ],
      "title": [
        {
          "__type": "Text",
          "__tag": 4046,
          "value": "Special methods"
        }
      ],
      "level": 1,
      "target": null
    },
    {
      "__type": "Section",
      "__tag": 4015,
      "children": [],
      "title": [
        {
          "__type": "Text",
          "__tag": 4046,
          "value": "Specific methods"
        }
      ],
      "level": 1,
      "target": null
    },
    {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Paragraph",
          "__tag": 4045,
          "children": [
            {
              "__type": "Text",
              "__tag": 4046,
              "value": "The following methods can be used to access information about the mask or to manipulate the mask."
            }
          ]
        },
        {
          "__type": "Code",
          "__tag": 4050,
          "value": ".. autosummary:: \n    :toctree:generated/\n    MaskedArray.__setmask__\n\n    MaskedArray.harden_mask\n    MaskedArray.soften_mask\n    MaskedArray.unshare_mask\n    MaskedArray.shrink_mask",
          "execution_status": null
        }
      ],
      "title": [
        {
          "__type": "Text",
          "__tag": 4046,
          "value": "Handling the mask"
        }
      ],
      "level": 2,
      "target": null
    },
    {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Code",
          "__tag": 4050,
          "value": ".. autosummary:: \n    :toctree:generated/\n    MaskedArray.get_fill_value\n    MaskedArray.set_fill_value",
          "execution_status": null
        }
      ],
      "title": [
        {
          "__type": "Text",
          "__tag": 4046,
          "value": "Handling the "
        },
        {
          "__type": "InlineRole",
          "__tag": 4003,
          "value": "fill_value",
          "domain": null,
          "role": null,
          "inventory": null
        }
      ],
      "level": 2,
      "target": null
    },
    {
      "__type": "Section",
      "__tag": 4015,
      "children": [
        {
          "__type": "Code",
          "__tag": 4050,
          "value": ".. autosummary:: \n    :toctree:generated/\n    MaskedArray.count",
          "execution_status": null
        }
      ],
      "title": [
        {
          "__type": "Text",
          "__tag": 4046,
          "value": "Counting the missing elements"
        }
      ],
      "level": 2,
      "target": null
    }
  ],
  "local_refs": []
}