intersects#
- intersects(cover, sids, method='binsearch')#
Intersects tests between a cover and a collection of sids.
Tests for each element of sids if it intersect with the cover.
- Parameters:
- cover: 1D array-like
Collection of sids representing a cover
- sids: 1D array-like
Collection of sids to test for intersection with cover
- method: string
intersects method. Can be ‘skiplist’, ‘binsearch’, or ‘nn’
- Returns:
- does_intersect: 1D numpy array of same length as sids.
True for all sids that intersect with the cover. False otherwise
Examples
>>> cover = numpy.array([4251398048237748227, 4269412446747230211, 4278419646001971203]) >>> sids = numpy.array([1251398048237748227, 4269412446747230210]) >>> pystare.intersects(cover, sids, method='binsearch') array([False, True])