Perform a conjugate multiplication of two 1D vectors.
JAX implementation of numpy.vdot()
.
a (Array | ndarray | bool | number | bool | int | float | complex) – first input array, if not 1D it will be flattened.
b (Array | ndarray | bool | number | bool | int | float | complex) – second input array, if not 1D it will be flattened. Must have a.size == b.size
.
precision (None | str | Precision | tuple[str, str] | tuple[Precision, Precision] | DotAlgorithm | DotAlgorithmPreset) – either None
(default), which means the default precision for the backend, a Precision
enum value (Precision.DEFAULT
, Precision.HIGH
or Precision.HIGHEST
) or a tuple of two such values indicating precision of a
and b
.
preferred_element_type (str | type[Any] | dtype | SupportsDType | None) – either None
(default), which means the default accumulation type for the input types, or a datatype, indicating to accumulate results to and return a result with that datatype.
Scalar array (shape ()
) containing the conjugate vector product of the inputs.
Examples
>>> x = jnp.array([1j, 2j, 3j]) >>> y = jnp.array([1., 2., 3.]) >>> jnp.vdot(x, y) Array(0.-14.j, dtype=complex64)
Note the difference between this and dot()
, which does not conjugate the first input when complex:
>>> jnp.dot(x, y) Array(0.+14.j, dtype=complex64)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.3