def features_axis_is_np(is_np, is_seq=False):
    """
    B - batch
    S - sequence
    F - features
    :param d: torch.Tensor or np.ndarray of shape specified below
    :param is_seq: True if d has sequence dim
    :return: axis of features
    """
    if is_np:
        # in case of sequence (is_seq == True): (S, F)
        # in case of sample: (F)
        return 0 + is_seq
    else:
        # in case of sequence: (B, S, F)
        # in case of sample: (B, F)
        return 1 + is_seq