ML Community Day is November 9! Join us for updates from TensorFlow, JAX, and more Learn more

ConvertibleFromPython

public protocol ConvertibleFromPython

A type that can be initialized from a PythonObject.

  • Creates a new instance from the given PythonObject, if possible.

    Note

    Conversion may fail if the given PythonObject instance is incompatible (e.g. a Python string object cannot be converted into an Int).

    Declaration

    init?(_ object: PythonObject)