def array(fr):
    """
    Return a Numpy array for input frame or Numpy array.
    
    Parameters
    ----------
    fr : Frame, or 2D ndarray
        Input frame or Numpy array
    
    Returns
    -------
    data : ndarray
        Data array
    """
    try:
        return fr.get_data()
    except AttributeError:
        return fr