if np.product(hbg.shape) == 0:
        hbg = np.ones((1,), int)