MCPcopy Create free account
hub / github.com/PythonOT/POT / dot

Method dot

ot/backend.py:2995–3007  ·  view source on GitHub ↗
(self, a, b)

Source from the content-addressed store, hash-verified

2993 return tnp.sign(a)
2994
2995 def dot(self, a, b):
2996 if len(b.shape) == 1:
2997 if len(a.shape) == 1:
2998 # inner product
2999 return tf.reduce_sum(tf.multiply(a, b))
3000 else:
3001 # matrix vector
3002 return tf.linalg.matvec(a, b)
3003 else:
3004 if len(a.shape) == 1:
3005 return tf.linalg.matvec(b.T, a.T).T
3006 else:
3007 return tf.matmul(a, b)
3008
3009 def abs(self, a):
3010 return tnp.abs(a)

Callers

nothing calls this directly

Calls 1

matmulMethod · 0.45

Tested by

no test coverage detected