Mercurial > hg > tvii
view tvii/dot.py @ 92:f1d1f2388fd6
test linear regression
author | Jeff Hammel <k0scist@gmail.com> |
---|---|
date | Sun, 17 Dec 2017 14:26:15 -0800 |
parents | bb8b6b06ca83 |
children |
line wrap: on
line source
""" dot product """ def dot(w, x): """inner dot product""" assert len(w) == len(x) return sum([a*b for a, b in zip(w,x)])