vectorized_trace
vectorized_trace(n, d)
Given a flattened stack of n dxd matrices, computes the trace operator that, when applied to this stack, returns another flattened stack of n values containing the traces of each of these matrices.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
n |
int
|
Number of matrices |
required |
d |
int
|
Dimension of matrices |
required |
Returns:
Name | Type | Description |
---|---|---|
T |
(n, n*d*d) scipy sparse matrix
|
|
Source code in src\fast_cody\vectorized_trace.py
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
|