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 (
Union[Array,ndarray,bool_,number,bool,int,float,complex,DuckTypedArray]) – example array-like, used for shape and dtype information.fill_value (
Union[Array,ndarray,bool_,number,bool,int,float,complex]) – a scalar value to fill the entries of the output array.dtype (
Union[str,type[Any],dtype,SupportsDType,None]) – optional, a dtype parameter for the output ndarray.shape (
Optional[Sequence[Union[int,Any]]]) – optional, a shape parameter for the output ndarray.
- Return type:
- Returns:
An ndarray with the same shape as x with its entries set equal to fill_value, similar to the output of np.full.