If you want a simple & fast answer: t_hash=tensor.sum() is pretty likely to work in most situations. It might be that not all your asks are required.
t_hash=tensor.sum()