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.lax.convert_element_type.html below:

jax.lax.convert_element_type — JAX documentation

jax.lax.convert_element_type#
jax.lax.convert_element_type(operand, new_dtype)[source]#

Elementwise cast.

This function lowers directly to the stablehlo.convert operation, which performs an elementwise conversion from one type to another, similar to a C++ static_cast.

Parameters:
  • operand (ArrayLike) – an array or scalar value to be cast.

  • new_dtype (DTypeLike | dtypes.ExtendedDType) – a dtype-like object (e.g. a numpy.dtype, a scalar type, or a valid dtype name) representing the target dtype.

Returns:

An array with the same shape as operand, cast elementwise to new_dtype.

Return type:

Array

Note

If new_dtype is a 64-bit type and x64 mode is not enabled, the appropriate 32-bit type will be used in its place.

If the input is a JAX array and the input dtype and output dtype match, then the input array will be returned unmodified.


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