Open DanilZittser opened 2 years ago
Hi @DanilZittser !
What were you trying to express with the Literal
? A 2d array with the second dimension of size 64
, 128
, 256
or 512
?
Would this maybe cover your case?
Encoding64 = NDArray[(Any, 64), Float32]
Encoding128 = NDArray[(Any, 128), Float32]
Encoding256 = NDArray[(Any, 256), Float32]
Encoding512 = NDArray[(Any, 512), Float32]
Encoding = Union[Encoding64, Encoding128, Encoding256, Encoding512]
Hi, to all!
I am very grateful for your library, it made the code much clearer.
This code raise TypeError:
TypeError: Invalid parameter for NDArray: "((1, typing.Literal[64, 128]), Float[32])"
How to make
NDArray
alias withLiteral
type?