Skip to content

Commit

Permalink
remove Union in favor of operator
Browse files Browse the repository at this point in the history
  • Loading branch information
d-v-b committed Aug 29, 2024
1 parent 7afaa6b commit 9368f97
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,7 @@ using a combination of `pydantic-ome-ngff` and `pydantic-zarr`:
```python
from pydantic_zarr.v2 import GroupSpec
from pydantic_ome_ngff.v04 import MultiscaleGroup, Axis
from typing import Union, Any
from typing import Any
import numpy as np
import zarr

Expand All @@ -440,7 +440,7 @@ import zarr
# type parameters. the first type parameter is for the attributes,
# which we set to `Any`, and the second type parameter is for the members of the group
# which we set to the union of GroupSpec and MultiscaleGroup.
GroupOfMultiscales = GroupSpec[Any, Union[GroupSpec, MultiscaleGroup]]
GroupOfMultiscales = GroupSpec[Any, GroupSpec | MultiscaleGroup]
axes = [Axis(name='x', type='space'), Axis(name='y', type='space')]

m_group_a = MultiscaleGroup.from_arrays(
Expand Down

0 comments on commit 9368f97

Please sign in to comment.