Matrix Multiplication With Multiple Dimensions in PYMC Model

Indexing in Aesara works just like Numpy (sans bugs):

import numpy as np

x = np.arange(10).reshape((5, 2))
print(x[:, [0, 1, 0, 1, 0]].shape)  # (5, 5)
print(x[[0, 1, 2, 3, 4], [0, 1, 0, 1, 0]].shape)  # (5,)
1 Like