Skip to content

Add XTensorLike type alias#1884

Open
ricardoV94 wants to merge 1 commit intopymc-devs:mainfrom
ricardoV94:xtensorlike
Open

Add XTensorLike type alias#1884
ricardoV94 wants to merge 1 commit intopymc-devs:mainfrom
ricardoV94:xtensorlike

Conversation

@ricardoV94
Copy link
Member

Needed for projects that liked to do TensorLike, and now want to switch to XTensorLike

@ricardoV94
Copy link
Member Author

We have a flaky numba test going on (saw it on other PRs)

Comment on lines +909 to +912
if XARRAY_AVAILABLE:
XTensorLike: TypeAlias = Union[TensorLike, XTensorVariable, "DataArray"]
else:
XTensorLike: TypeAlias = TensorLike | XTensorVariable
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure about this conditional type hint, but I wanted to keep xarray optional

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant