def get_repadding(crops, d_shape):

    """
    
    Returns  
    -------  
        tuple
            padding values to restore 3D np array after it was cropped.  
    
    Parameters  
    ----------  
    
    crops : list
        3 tuples in a list [(nz1,nz2), (ny1,ny2), (nx1,nx2)]  

    d_shape : tuple
        original shape of 3D array  
    
    """
    pads = []
    for idx, crop in enumerate(crops):
        pad = [0,0]
        if (crop[0] is not None):
            if crop[0] >= 0:
                pad[0] = abs(crop[0])
            elif crop[0] < 0:
                pad[0] = d_shape[idx] - abs(crop[0])
        
        if crop[1] is not None:
            if crop[1] >= 0:
                pad[1] = d_shape[idx] - abs(crop[1])
            elif crop[1] < 0:
                pad[1] = abs(crop[1])
        pads.append(tuple(pad))
        
    return tuple(pads)