Skip to main content

scale_native_tensor

Function scale_native_tensor 

Source
pub fn scale_native_tensor(
    tensor: &Tensor,
    scalar: &BackendScalar,
) -> Result<Tensor, BridgeError>
Expand description

Multiply a native tensor by a dynamic scalar.

ยงErrors

Returns a BridgeError when tensor or scalar cannot be promoted to a common dtype, when the dtype is integer, bool, or external, or when the backend rejects the scaled tensor.