"""Measure linear co-movement.

Pair observations by timestamp before calculating. Constant series have undefined correlation.
All inputs are synthetic teaching examples. Run: python 28_paired-correlation.py
"""
from tv_math import *

r=correlation([1,2,3],[6,4,2])
assert abs(r+1)<1e-12
print(r)
