# dask.array.ma.getdata

### dask.array.ma.getdata(a)

Return the data of a masked array as an ndarray.

This docstring was copied from numpy.ma.getdata.

Some inconsistencies with the Dask version may exist.

Return the data of a (if any) as an ndarray if a is a `MaskedArray`,
else return a as an ndarray or subclass (depending on subok) if not.

* **Parameters:**
  **a**
  : Input `MaskedArray`, alternatively an ndarray or a subclass thereof.

  **subok**
  : Whether to force the output to be a pure ndarray (False) or to
    return a subclass of ndarray if appropriate (True, default).

#### SEE ALSO
`getmask`
: Return the mask of a masked array, or nomask.

[`getmaskarray`](dask.array.ma.getmaskarray.html.md#dask.array.ma.getmaskarray)
: Return the mask of a masked array, or full array of False.

### Examples

```pycon
>>> import numpy as np
>>> import numpy.ma as ma
>>> a = ma.masked_equal([[1,2],[3,4]], 2)
>>> a
masked_array(
  data=[[1, --],
        [3, 4]],
  mask=[[False,  True],
        [False, False]],
  fill_value=2)
>>> ma.getdata(a)
array([[1, 2],
       [3, 4]])
```

Equivalently use the `MaskedArray` data attribute.

```pycon
>>> a.data
array([[1, 2],
       [3, 4]])
```

<!-- !! processed by numpydoc !! -->
