Mercurial > hg > tvii
view tvii/dot.py @ 47:fc81439f7ae2
[doc] add a placeholder for discussion of datasets
author | Jeff Hammel <k0scist@gmail.com> |
---|---|
date | Sun, 17 Sep 2017 12:01:14 -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)])