Mercurial > hg > tvii
view tvii/dot.py @ 25:c52d8173b056
[regression] cleanup + proper structure
author | Jeff Hammel <k0scist@gmail.com> |
---|---|
date | Mon, 04 Sep 2017 10:16:01 -0700 |
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)])