torchvision.transforms.ToTensor() does accept a ndarray. What doesn’t is the torchvision.transforms.Resize() or CenterCrop().
Resize() takes a PIL image, so you need to convert the ndarray like this:
from PIL import Image
PIL_image = Image.fromarray(ndarray_image)

Hope this does the trick for you!