class_docstr: A simple lookup table that stores embeddings of a fixed size.
class_docstr_tok: ["A","simple","lookup","table","that","stores","embeddings","of","a","fixed","size","."]
docstr: **Arguments:**
  
  - `x`: The table index. Should be a scalar integer array.
  - `key`: Ignored; provided for compatibility with the rest of the Equinox API.
      (Keyword only argument.)
  
  **Returns:**
  
  A JAX array of shape `(embedding_size,)`, from the x-th index of the embedding
  table.
docstr_tok: ["*","*","Arguments",":","*","*","-","`","x","`",":","The","table","index",".","Should","be","a","scalar","integer","array",".","-","`","key","`",":","Ignored",";","provided","for","compatibility","with","the","rest","of","the","Equinox","API",".","(","Keyword","only","argument",".",")","*","*","Returns",":","*","*","A","JAX","array","of","shape","`","(","embedding_size",",",")","`",",","from","the","x-th","index","of","the","embedding","table","."]
code: def __call__(
      self, x: Int[ArrayLike, ""], *, key: Optional[PRNGKeyArray] = None
  ) -> Array:
      """**Arguments:**
  
      - `x`: The table index. Should be a scalar integer array.
      - `key`: Ignored; provided for compatibility with the rest of the Equinox API.
          (Keyword only argument.)
  
      **Returns:**
  
      A JAX array of shape `(embedding_size,)`, from the x-th index of the embedding
      table.
      """
      if is_array_like(x) and jnp.shape(x) == ():
          return self.weight[x]
      else:
          raise ValueError(
              "`eqx.nn.Embedding()(x)` should be called with a scalar index `x`. "
              "Use `jax.vmap` if you would like to index with multiple values."
          )
  
file_path: equinox/equinox/nn/_embedding.py
imports: from typing import Optional
  import jax
  import jax.numpy
  import jax.random
  from jaxtyping import Array, ArrayLike, Float, Int, PRNGKeyArray
  from .._filters import is_array_like
  from .._module import field, Module
label_desc: Use image node_id 2 for calling the Embedding obj's underlying member method code with example usage: obj.__call__(x) and returns: self