jax.lax.full_likeΒΆ

jax.lax.full_like(x, fill_value, dtype=None, shape=None)[source]ΒΆ

Create a full array like np.full based on the example array x.

Parameters
  • x (Any) – example array-like, used for shape and dtype information.

  • fill_value (Any) – a scalar value to fill the entries of the output array.

  • dtype (Optional[Any]) – optional, a dtype parameter for the output ndarray.

  • shape (Optional[Sequence[Union[int, Any]]]) – optional, a shape parameter for the output ndarray.

Return type

Any

Returns

An ndarray with the same shape as x with its entries set equal to fill_value, similar to the output of np.full.