added function to zero a tensor