pytaco.outer
- pytaco.outer(t1, t2, out_format=mode_format(compressed), dtype=None)
Computes the outer product of two vectors.
- Parameters
- t1, t2: tensor, array_like
The input vectors. If the input is not a vector an error is raised.
- out_format: format, mode_format, optional
If a
format
is specified, the result tensor is stored in the format out_format.If a
mode_format
is specified, the result the result tensor has a with all of the dimensions stored in themode_format
passed in.
- dtype: Datatype
The datatype of the output tensor.
- Returns
- outer: tensor
The outer product of the tensors passed in.
Examples
>>> import numpy as np >>> import pytaco as pt >>> a = pt.from_array(np.arange(3)) >>> pt.outer(a, a).to_array() array([[0, 0, 0], [0, 1, 2], [0, 2, 4]], dtype=int64)