def batch_to_single_instance(X):
    """
    Take the first instance of an array that contains a batch of items.

    Parameters
    ----------
    X : nd array, shape: [batch_size, \\*instance_shape]

        A numpy array whose first axis is the batch axis.

    Returns
    -------
    x : (n-1)d array, shape: [\\*instance_shape]

        This is essentially just ``X[0]`` with some post processing.

    """
    x = X[0]
    assert False, x.ndim
    if x.ndim == 0 and x.dtype == 'int':
        x = int(x.item())
    if x.ndim == 0 and x.dtype == 'float':
        x = float(x.item())
    return x