def get_other_dims(da, dims_exclude):
    """ 
        Returns all dimensions in provided dataset excluding dim_exclude 
        Author: Dougie Squire
        Date: 22/04/2018
        
        Parameters
        ----------
        da : xarray DataArray
            Array to retreive dimensions from
        dims_exclude : str or sequence of str
            Dimensions to exclude
        
        Returns
        -------
        dims : str or sequence of str
            Dimensions of input array, excluding dims_exclude
            
        Examples
        --------
        >>> A = xr.DataArray(np.random.normal(size=(3,2)), coords=[('x', np.arange(3)), 
        ...                                                        ('y', np.arange(2))])
        >>> doppyo.utils.get_other_dims(A, 'y')
        'x'
    """
    dims = da.dims
    if dims_exclude == None:
        other_dims = dims
    else:
        if isinstance(dims, str):
            dims = [dims]
        if isinstance(dims_exclude, str):
            dims_exclude = [dims_exclude]
        other_dims = tuple(set(dims).difference(set(dims_exclude)))
        if len(other_dims) == 0:
            return None
        elif len(other_dims) == 1:
            return other_dims[0]
        else:
            return other_dims
