{"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":"aed76260-2bed-58d2-ae29-2ace99ac5b42","task_key":"default--v0~2e1~2e0~5fhf--aed76260-2bed-58d2-ae29-2ace99ac5b42","task_revision_id":"1","upstream_id":"","short_description":"BigCodeBench v0.1.0_hf aed76260-2bed-58d2-ae29-2ace99ac5b42","config":"default","split":"v0.1.0_hf","body":"{\"code_prompt\":\"import numpy as np\\nimport matplotlib.pyplot as plt\\nimport seaborn as sns\\ndef task_func(array, features=None, seed=None):\\n\",\"complete_prompt\":\"import numpy as np\\nimport matplotlib.pyplot as plt\\nimport seaborn as sns\\n\\n\\ndef task_func(array, features=None, seed=None):\\n    \\\"\\\"\\\"\\n    Shuffles the columns of a given 2D numpy array and visualizes it as a heatmap.\\n\\n    Parameters:\\n    - array (ndarray): The 2D numpy array to shuffle and plot. It must not be empty.\\n    - features (list of str, optional): Custom labels for the columns after shuffling.\\n                                        If not specified, default numerical labels are used.\\n                                        The list must match the number of columns in 'array'.\\n    - seed (int, optional): Seed for the random number generator to ensure reproducibility of the shuffle.\\n\\n    Returns:\\n    - Axes: The matplotlib Axes object containing the heatmap.\\n\\n    Raises:\\n    - ValueError: If 'features' is provided and does not match the number of columns in 'array'; and\\n                  if 'array' is empty or not 2-dimensional.\\n\\n    Requirements:\\n    - numpy\\n    - matplotlib.pyplot\\n    - seaborn\\n\\n    Notes:\\n    - This function uses the features list as labels for the heatmap's x-axis if features is provided;\\n      otherwise, it defaults to strings of the numerical labels starting from 1 up to the number of\\n      columns in the array.\\n\\n    Example:\\n    >>> np.random.seed(0)\\n    >>> array = np.random.rand(2, 5)\\n    >>> ax = task_func(array, features=['A', 'B', 'C', 'D', 'E'], seed=1)\\n    >>> type(ax)\\n    <class 'matplotlib.axes._axes.Axes'>\\n    >>> ax.collections[0].get_array().data.flatten()\\n    array([0.60276338, 0.71518937, 0.4236548 , 0.5488135 , 0.54488318,\\n           0.891773  , 0.43758721, 0.38344152, 0.64589411, 0.96366276])\\n    \\\"\\\"\\\"\\n\",\"entry_point\":\"task_func\",\"instruct_prompt\":\"Shuffles the columns of a given 2D numpy array and visualizes it as a heatmap.\\nNote that: Notes: This function uses the features list as labels for the heatmap's x-axis if features is provided; otherwise, it defaults to strings of the numerical labels starting from 1 up to the number of columns in the array.\\nThe function should raise the exception for: ValueError: If 'features' is provided and does not match the number of columns in 'array'; and if 'array' is empty or not 2-dimensional.\\nThe function should output with:\\n    Axes: The matplotlib Axes object containing the heatmap.\\nYou should write self-contained code starting with:\\n```\\nimport numpy as np\\nimport matplotlib.pyplot as plt\\nimport seaborn as sns\\ndef task_func(array, features=None, seed=None):\\n```\",\"libs\":\"['numpy', 'matplotlib', 'seaborn']\"}","display_format":"code","language":"","answer_status":"published","assets":[],"source_url":"https://bigcode-bench.github.io/","history":"initial import","indexing_mode":"index","subproblems":[],"grids":[]}