{"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":"noindex","profile":{"resources":[],"task_format":"","scoring":"","metric":"","size":"","answer_access":"","license":"","citation":"","maintainer":"","released":"","why_hard":"","related":[]}},"task_id":"7fa75c7c-8164-518a-9a38-c8ddfe4d5638","task_key":"default--v0~2e1~2e0~5fhf--7fa75c7c-8164-518a-9a38-c8ddfe4d5638","task_revision_id":"2","upstream_id":"","short_description":"BigCodeBench v0.1.0_hf 7fa75c7c-8164-518a-9a38-c8ddfe4d5638","config":"default","split":"v0.1.0_hf","body":"{\"code_prompt\":\"import numpy as np\\nfrom scipy.stats import mode\\nfrom scipy.stats import entropy\\ndef task_func(numbers):\\n\",\"complete_prompt\":\"import numpy as np\\nfrom scipy.stats import mode\\nfrom scipy.stats import entropy\\n\\n\\ndef task_func(numbers):\\n    \\\"\\\"\\\"\\n    Creates and returns a dictionary with the mode and entropy of a numpy array constructed from a given list.\\n    The function first converts the list into a numpy array, then calculates the mode and the entropy (base 2) of this array,\\n    and finally adds them to the initial dictionary with the keys 'mode' and 'entropy'.\\n\\n    Parameters:\\n        numbers (list): A non-empty list of numbers from which a numpy array is created to calculate mode and entropy.\\n\\n    Returns:\\n        dict: A dictionary containing the 'mode' and 'entropy' of the array with their respective calculated values.\\n\\n    Raises:\\n        ValueError if the input list `numbers` is empty\\n\\n    Requirements:\\n        - numpy\\n        - scipy.stats.mode\\n        - scipy.stats.entropy\\n\\n    Examples:\\n        >>> result = task_func([1, 2, 2, 3, 3, 3])\\n        >>> 'mode' in result and result['mode'] == 3 and 'entropy' in result\\n        True\\n    \\\"\\\"\\\"\\n\",\"entry_point\":\"task_func\",\"instruct_prompt\":\"Creates and returns a dictionary with the mode and entropy of a numpy array constructed from a given list. The function first converts the list into a numpy array, then calculates the mode and the entropy (base 2) of this array, and finally adds them to the initial dictionary with the keys 'mode' and 'entropy'.\\nThe function should raise the exception for: ValueError if the input list `numbers` is empty\\nThe function should output with:\\n    dict: A dictionary containing the 'mode' and 'entropy' of the array with their respective calculated values.\\nYou should write self-contained code starting with:\\n```\\nimport numpy as np\\nfrom scipy.stats import mode\\nfrom scipy.stats import entropy\\ndef task_func(numbers):\\n```\",\"libs\":\"['numpy', 'scipy']\"}","display_format":"code","language":"","answer_status":"published","assets":[],"source_url":"https://bigcode-bench.github.io/","history":"initial import","indexing_mode":"noindex","subproblems":[],"grids":[]}