Skip to content

An action with NDArray return type doesn't work over HTTP #231

@julianstirling

Description

@julianstirling

Describe the bug
An action with NDArray return type doesn't work over HTTP. It throws a the following error

pydantic_core._pydantic_core.PydanticSerializationError: Unable to serialize unknown type: <class 'numpy.ndarray'>

ArrayModel can be used, but then it is typehinted incorrectly when called on the server

To Reproduce
See unit test added in #230

Expected behaviour
It serialises just as ArrayModel would.

System:

  • OS: Kubuntu 24.04
  • Python version. 3.11
  • Version. 0.0.13

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions