outer_product

pyapprox.util.outer_product(input_sets, axis=0)[source]

Construct the outer product of an arbitary number of sets.

Parameters:
input_sets

The sets to be used in the outer product

Returns:
resultnp.ndarray(np.prod(sizes))

The outer product of the sets. result.dtype will be set to the first entry of the first input_set

Examples

{1,2}×{3,4}={1×3,2×3,1×4,2×4}={3,6,4,8}