English
File size: 209 Bytes
26225c5
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
import torch


__all__ = ['is_xyz_tensor']


def is_xyz_tensor(xyz):
    if not isinstance(xyz, torch.Tensor):
        return False
    if not xyz.dim() == 2:
        return False
    return xyz.shape[1] == 3