A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.jax.dev/en/latest/_autosummary/jax.numpy.matvec.html below:

jax.numpy.matvec — JAX documentation

jax.numpy.matvec#
jax.numpy.matvec(x1, x2, /)[source]#

Batched matrix-vector product.

JAX implementation of numpy.matvec().

Parameters:
Returns:

An array of shape (..., M) containing the batched matrix-vector product.

Return type:

Array

Examples

Simple matrix-vector product:

>>> x1 = jnp.array([[1, 2, 3],
...                 [4, 5, 6]])
>>> x2 = jnp.array([7, 8, 9])
>>> jnp.matvec(x1, x2)
Array([ 50, 122], dtype=int32)

Batched matrix-vector product:

>>> x2 = jnp.array([[7, 8, 9],
...                 [5, 6, 7]])
>>> jnp.matvec(x1, x2)
Array([[ 50, 122],
       [ 38,  92]], dtype=int32)

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.4