Skip to Content
DocumentationUtilspython_utils

python_utils

View the code on GitHub

Structs

Functions

memcpy_to_numpy

memcpy_to_numpy(array: PythonObject, tensor: Array)
more details
Args
  • array: PythonObject

  • tensor: Array

shape_to_python_list

shape_to_python_list(shape: List[Int]) -> PythonObject
more details
Args
  • shape: List[Int]
Returns
  • PythonObject

get_np_dtype

get_np_dtype[dtype: DType](np: PythonObject) -> PythonObject
more details
Args
  • np: PythonObject
Returns
  • PythonObject

array_to_numpy

array_to_numpy(tensor: Array, np: PythonObject) -> PythonObject
more details
Args
  • tensor: Array

  • np: PythonObject

Returns
  • PythonObject

tensor_to_array

tensor_to_array(owned src: Tensor[float32]) -> Array
more details
Args
  • src: Tensor[float32]
Returns
  • Array
Last updated on