Package lib :: Package dispersion :: Module matrix_power
[hide private]
[frames] | no frames]

Module matrix_power

source code

Module for the calculation of the matrix power, for higher dimensional data.

Functions [hide private]
 
create_index(data)
Method to create the helper index matrix, to help figuring out the index to store in the data matrix.
source code
numpy float array of rank [NE][NS][NM][NO][ND][X][X]
matrix_power_strided_rank_NE_NS_NM_NO_ND_x_x(data, power)
Calculate the exact matrix power by striding through higher dimensional data.
source code
 
stride_help_array_rank_NE_NS_NM_NO_ND_x(data)
Method to stride through the data matrix, extracting the outer array with nr of elements as Column length.
source code
 
stride_help_element_rank_NE_NS_NM_NO_ND(data)
Method to stride through the data matrix, extracting the outer element.
source code
 
stride_help_square_matrix_rank_NE_NS_NM_NO_ND_x_x(data)
Helper function calculate the strides to go through the data matrix, extracting the outer Row X Col matrix.
source code
Variables [hide private]
  __package__ = 'lib.dispersion'

Imports: as_strided, float64, int16, zeros, matrix_power


Function Details [hide private]

matrix_power_strided_rank_NE_NS_NM_NO_ND_x_x(data, power)

source code 

Calculate the exact matrix power by striding through higher dimensional data. This of dimension [NE][NS][NM][NO][ND][X][X].

Here X is the Row and Column length, of the outer square matrix.

Parameters:
  • data (numpy float array of rank [NE][NS][NM][NO][ND][X][X]) - The square matrix to calculate the matrix exponential of.
  • power (numpy int array of rank [NE][NS][NM][NO][ND]) - The matrix exponential power array, which hold the power integer to which to raise the outer matrix X,X to.
Returns: numpy float array of rank [NE][NS][NM][NO][ND][X][X]
The matrix pwer. This will have the same dimensionality as the data matrix.