Skip to content

Add a runtime validation that the raster uses supported datatypes #428

Description

@nathanjmcdougall

Makes sense as a pydantic model_validator.

We only support float and int dtypes right now. We don't support boolean, for instance. But the user can meddle with a raster internally to change the datatype.

We should have a validation error to protect against this happening.

It might be quite hard to do if numpy arrays can have their dtype modified in-place. Add some tests to try and understand that if it is a limitation.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions