pytensor
pytensor copied to clipboard
Use contraction path to optimize `pt.nlinalg.matrix_dot`
Description
Right now we have a function pt.nlinalg.matrix_dot
that is just a helper for doing repeated dot products. This is similar to but worse than np.linalg.multi_dot
, because multi_dot
also computes an optimal contraction path, and does the dot products in a smart order.
#722 added optimized contraction path logic, so we could include this into our matrix_dot
function. While we're at it, we should rename the function to multi_dot
to match the numpy API.