Skip to content

v1.6.1 - Union Types

Compare
Choose a tag to compare
@sneakers-the-rat sneakers-the-rat released this 24 Sep 07:28
· 68 commits to main since this release
1cf69eb

It's now possible to do this, like it always should have been

class MyModel(BaseModel):
    array: NDArray[Any, int | float]

Features

  • Support for Union Dtypes

Structure

  • New validation module containing shape and dtype convenience methods
    to declutter main namespace and make a grouping for related code
  • Rename all serialized arrays within a container dict to value to be able
    to identify them by convention and avoid long iteration - see perf below.

Perf

  • Avoid iterating over every item in an array trying to convert it to a path for
    a several order of magnitude perf improvement over 1.6.0 (oops)

Docs

  • Page for dtypes, mostly stubs at the moment, but more explicit documentation
    about what kind of dtypes we support.