Description:
casting a TorchTensor NdArray fails
How to reproduce:
from docarray import BaseDoc
from docarray.typing import NdArray
import torch
class MyDoc(BaseDoc):
tens: NdArray
t1 = torch.rand(512)
doc = MyDoc(tens=t1)
Expected a numpy.ndarray compatible type, got <class 'torch.Tensor'> (type=value_error)
TODO:
- Fix this in the
validate function of NdArray
- what about coercions to/from tf? do we have tests for this?
Description:
casting a TorchTensor NdArray fails
How to reproduce:
TODO:
validatefunction ofNdArray