Something unusual about the tensor that you’re working with? The following should work fine (note that the Python builtin type also gives what you want).
>>> import torch
>>> a = torch.ones(1)
>>> a.type()
'torch.FloatTensor'
>>> type(a)
<class 'torch.FloatTensor'>