from docarray import BaseDocument, DocumentArray
from docarray.typing import TorchTensor
import torch
class Image(BaseDocument):
tensor: TorchTensor[3, 224, 224]
batch = DocumentArray[Image](
[Image(tensor=torch.zeros(3, 224, 224)) for _ in range(10)]
)
batch.tensor # here pycahrm will complain
With Document (and pydantic) we don't have this problem

We need to find a way (like in pandas) so that pycharm and other tool does not complain
With Document (and pydantic) we don't have this problem

We need to find a way (like in pandas) so that pycharm and other tool does not complain