ce_util
- quantecon.ce_util.ckron(*arrays)[source]
Repeatedly applies the np.kron function to an arbitrary number of input arrays
- Parameters:
- *arraystuple/list of np.ndarray
- Returns:
- outnp.ndarray
The result of repeated kronecker products.
Notes
Based of original function ckron in CompEcon toolbox by Miranda and Fackler.
References
Miranda, Mario J, and Paul L Fackler. Applied Computational Economics and Finance, MIT Press, 2002.
- quantecon.ce_util.gridmake(*arrays)[source]
Expands one or more vectors (or matrices) into a matrix where rows span the cartesian product of combinations of the input arrays. Each column of the input arrays will correspond to one column of the output matrix.
- Parameters:
- *arraystuple/list of np.ndarray
Tuple/list of vectors to be expanded.
- Returns:
- outnp.ndarray
The cartesian product of combinations of the input arrays.
Notes
Based of original function
gridmake
in CompEcon toolbox by Miranda and FacklerReferences
Miranda, Mario J, and Paul L Fackler. Applied Computational Economics and Finance, MIT Press, 2002.