| [ Web Proxy ] |
| Viewing: https://numpy.org/doc/stable/reference/generated/../random/../generated/numpy.ma.setdiff1d.html | [Back] [Original] |
Section Navigation
Set difference of 1D arrays with unique elements.
The output is always a masked array. See numpy.setdiff1d for more
details.
See also
numpy.setdiff1dEquivalent function for ndarrays.
Examples
>>> import numpy as np
>>> x = np.ma.array([1, 2, 3, 4], mask=[0, 1, 0, 1])
>>> np.ma.setdiff1d(x, [1, 2])
masked_array(data=[3, --],
mask=[False, True],
fill_value=999999)
Copyright 2008-2026, NumPy Developers.
Created using Sphinx 7.2.6.
Built with the PyData Sphinx Theme 0.17.1.
| Web Proxy Viewer | New URL | Original Page |