Skip to Content
DocumentationUtilsarray_conversions

array_conversions

View the code on GitHub

Structs

Functions

to_torch

to_torch(arg: Array) -> PythonObject
Converts an endia Array to a torch tensor.
Args
  • arg: Array
Returns
  • PythonObject

to_torch_tensor

to_torch_tensor(arg: Array) -> PythonObject
more details
Args
  • arg: Array
Returns
  • PythonObject

is_close

is_close(x: Array, x_torch: PythonObject, rtol: SIMD[float32, 1] = SIMD(#kgen.float_literal<1|10000>)) -> Bool
Checks if the values in the endia Array and the torch tensor are equal up to a relative tolerance.
Args
  • x: Array

  • x_torch: PythonObject

  • rtol: SIMD[float32, 1] (default: SIMD(#kgen.float_literal<1|10000>))

Returns
  • Bool
Last updated on