def _angle_cos(self, p0, p1, p2):

        d1 = (p0 - p1).astype('float')
        d2 = (p2 - p1).astype('float')
        return abs(np.dot(d1, d2) / np.sqrt(np.dot(d1, d1) * np.dot(d2, d2)))
Test for firing on entity change with state filter.
dataset/ETHPy150Open GoogleCloudPlatform/appengine-opencv-sudoku-python/sudoku_image_parser.py/SudokuImageParser._angle_cos--crossover with--dataset/ETHPy150Open home-assistant/home-assistant/tests/components/automation/test_state.py/TestAutomationState.test_if_fires_on_entity_change_with_state_filter