def detect_array(df):
    """Determines array type using number of probes columns in df. Returns array string."""
    if df.shape[0] > df.shape[1]:
        col_count = df.shape[0]
    else:
        col_count = df.shape[1]
    if 26000 <= col_count <= 28000:
        return '27k'
    if 440000 <= col_count <= 490000:
        return '450k'
    if 869001 <= col_count <= 869335:
        return 'EPIC+'
    if 860000 <= col_count <= 869000:
        return 'EPIC'
    else:
        raise ValueError(
            'Unsupported Illumina array type. Your data file contains {0} rows for probes.'
            .format(col_count))
