def trace_positive_cond():
    sq = (torch.sqrt((trace + 1.0)) * 2.0)
    qw = (0.25 * sq)
    qx = safe_zero_division((m21 - m12), sq)
    qy = safe_zero_division((m02 - m20), sq)
    qz = safe_zero_division((m10 - m01), sq)
    return torch.cat([qx, qy, qz, qw], dim=(- 1))
def trace_positive_cond():
    sq = (torch.sqrt((trace + 1.0)) * 2.0)
    qw = (0.25 * sq)
    qx = safe_zero_division((m21 - m12), sq)
    qy = safe_zero_division((m02 - m20), sq)
    qz = safe_zero_division((m10 - m01), sq)
    return torch.cat([qx, qy, qz, qw], dim=(- 1))