Relative Content

Tag Archive for pythonnumpy

numpy add array of constants to array of matrixes

Consider a numpy array X with m elements. Each element it’s itself a numpy matrix of a generic (but, more importantly, fixed shape (n0, n1, ..., n) so that X shape is (m, n0, n1, ..., n).
Now, take a list of m (different) scalar, let’s say something like this: