pyyeti.locate.flippv¶
- pyyeti.locate.flippv(pv, n)[source]¶
Flips the meaning of an index partition vector.
- Parameters:
pv (1d ndarray) – The index partition vector to flip.
n (integer) – The length of the dimension to partition.
- Returns:
notpv (ndarray) – Index vector; the complement of pv.
Examples
>>> import numpy as np >>> from pyyeti import locate >>> pv = np.array([0, 3, 5]) >>> locate.flippv(pv, 8) array([1, 2, 4, 6, 7]...)