def dot(a, b, ashape=None, bshape=None):
a = to_potential(a)<EOL>b = to_potential(b)<EOL>if is_const_potential(a) and is_const_potential(b): return PotentialConstant(np.dot(a.c, b.c))<EOL>else: return DotPotential(a, b, g_shape=ashape, h_shape=bshape)<EOL>
dot(a,b) yields a potential function that represents the dot product of a and b.

Currently only vector and scalars are allowed.