{"kind":"task","effective_mode":"full","benchmark":{"kind":"benchmark","effective_mode":"full","slug":"bigcodebench","formal_name":"BigCodeBench","introduction":"BigCodeBench poses 1,140 function-level tasks drawn across 139 libraries. It tests whether a model can compose several real APIs correctly rather than write one self-contained function.","introduction_ja":"","introduction_en":"","category":"Category not supplied","task_count":null,"acquisition_status":"Acquisition status not supplied","official_url":"https://bigcode-bench.github.io/","indexing_mode":"index","profile":{"resources":[],"task_format":"","scoring":"","metric":"","size":"","answer_access":"","license":"","citation":"","maintainer":"","released":"","why_hard":"","related":[],"history":"","construction":"","limitations":"","saturation":"","scores":[]}},"task_id":"6a103c44-d77f-5098-8912-2cf6464644a1","task_key":"default--v0~2e1~2e0~5fhf--6a103c44-d77f-5098-8912-2cf6464644a1","task_revision_id":"1","upstream_id":"","short_description":"BigCodeBench v0.1.0_hf 6a103c44-d77f-5098-8912-2cf6464644a1","config":"default","split":"v0.1.0_hf","body":"{\"code_prompt\":\"import numpy as np\\nfrom sklearn.cluster import KMeans\\ndef task_func(data, n_clusters):\\n\",\"complete_prompt\":\"import numpy as np\\nfrom sklearn.cluster import KMeans\\n\\n\\ndef task_func(data, n_clusters):\\n    \\\"\\\"\\\"\\n    Apply KMeans clustering to a 2D numeric array and find the indices of the data points in each cluster.\\n\\n    Parameters:\\n    data (numpy array): The 2D numpy array for clustering.\\n    n_clusters (int): The number of clusters to form.\\n\\n    Returns:\\n    dict: A dictionary where keys are cluster labels and values are lists of indices for data points in the cluster.\\n\\n    Requirements:\\n    - numpy\\n    - sklearn.cluster\\n\\n    Example:\\n    >>> data = np.array([[1, 2], [3, 4], [5, 6], [7, 8]])\\n    >>> cluster = task_func(data, 2)\\n    >>> cluster_list = list(cluster.values())\\n    >>> cluster_list.sort(key=lambda x: x[0])\\n    >>> print(cluster_list)\\n    [array([0, 1]), array([2, 3])]\\n\\n    >>> data = np.array([[1, 1], [2, 2]])\\n    >>> cluster = task_func(data, 2)\\n    >>> cluster_list = list(cluster.values())\\n    >>> cluster_list.sort(key=lambda x: x[0])\\n    >>> print(cluster_list)\\n    [array([0]), array([1])]\\n    \\\"\\\"\\\"\\n\",\"entry_point\":\"task_func\",\"instruct_prompt\":\"Apply KMeans clustering to a 2D numeric array and find the indices of the data points in each cluster. >>> data = np.array([[1, 1], [2, 2]]) >>> cluster = task_func(data, 2) >>> cluster_list = list(cluster.values()) >>> cluster_list.sort(key=lambda x: x[0]) >>> print(cluster_list) [array([0]), array([1])]\\nThe function should output with:\\n    dict: A dictionary where keys are cluster labels and values are lists of indices for data points in the cluster.\\nYou should write self-contained code starting with:\\n```\\nimport numpy as np\\nfrom sklearn.cluster import KMeans\\ndef task_func(data, n_clusters):\\n```\",\"libs\":\"['numpy', 'sklearn']\"}","display_format":"code","language":"","answer_status":"published","assets":[],"source_url":"https://bigcode-bench.github.io/","history":"initial import","indexing_mode":"index","subproblems":[],"grids":[]}