Mentions légales du service

Skip to content
Snippets Groups Projects
  • ANDREY Paul's avatar
    7f3327b1
    Enhance typing of 'Model' and 'Vector' using 'typing.Generic'. · 7f3327b1
    ANDREY Paul authored
    - Make `Vector` a `Generic[T]` to indicate that stored data arrays
      should have coherent types.
    - Make `Model` a `Generic[VectorT]` to indicate that a given model
      class is associated with a unique vector class.
    - In `Optimizer` and plug-ins ABCs, specify that inputs and outputs
      should be coherent using `Vector[T]` and `Model[Vector[T]]` type-
      hints.
    - In concrete plug-in classes, leave the existing code as-is so as
      not to make it harder to read.
    Enhance typing of 'Model' and 'Vector' using 'typing.Generic'.
    ANDREY Paul authored
    - Make `Vector` a `Generic[T]` to indicate that stored data arrays
      should have coherent types.
    - Make `Model` a `Generic[VectorT]` to indicate that a given model
      class is associated with a unique vector class.
    - In `Optimizer` and plug-ins ABCs, specify that inputs and outputs
      should be coherent using `Vector[T]` and `Model[Vector[T]]` type-
      hints.
    - In concrete plug-in classes, leave the existing code as-is so as
      not to make it harder to read.