{"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":"179985e5-c722-59ed-a227-7a210fcdacaf","task_key":"default--v0~2e1~2e0~5fhf--179985e5-c722-59ed-a227-7a210fcdacaf","task_revision_id":"2","upstream_id":"","short_description":"BigCodeBench v0.1.0_hf 179985e5-c722-59ed-a227-7a210fcdacaf","config":"default","split":"v0.1.0_hf","body":"{\"code_prompt\":\"import numpy as np\\nfrom scipy.stats import ttest_1samp\\nimport matplotlib.pyplot as plt\\n# Constants\\nALPHA = 0.05\\ndef task_func(data_matrix):\\n\",\"complete_prompt\":\"import numpy as np\\nfrom scipy.stats import ttest_1samp\\nimport matplotlib.pyplot as plt\\n\\n# Constants\\nALPHA = 0.05\\n\\n\\ndef task_func(data_matrix):\\n    \\\"\\\"\\\"\\n    Calculate the mean value of each row in a 2D data matrix, run a t-test from a sample against the population value, and record the mean values that differ significantly.\\n    - Create a lineplot with the mean of rows in red. Its label is 'Means'.\\n    - Create a line plot with the significant_indices (those with a pvalue less than ALPHA) on the x-axis and the corresponding means on the y-axis. This plot should be blue. Its label is 'Significant Means'.\\n    - Create an horizontal line which represent the mean computed on the whole 2D matrix. It should be in green. Its label is 'Population Mean'.\\n\\n    Parameters:\\n    data_matrix (numpy.array): The 2D data matrix.\\n\\n    Returns:\\n    tuple: A tuple containing:\\n        - list: A list of indices of the means that are significantly different from the population mean.\\n        - Axes: The plot showing the means and significant means.\\n\\n    Requirements:\\n    - numpy\\n    - scipy.stats.ttest_1samp\\n    - matplotlib.pyplot\\n\\n    Example:\\n    >>> data = np.array([[6, 8, 1, 3, 4], [-1, 0, 3, 5, 1]])\\n    >>> indices, ax = task_func(data)\\n    >>> print(indices)\\n    []\\n\\n    Example 2:\\n    >>> data = np.array([[1, 2, 3], [4, 5, 6], [7, 8, 9]])\\n    >>> indices, ax = task_func(data)\\n    >>> print(indices)\\n    []\\n    \\\"\\\"\\\"\\n\",\"entry_point\":\"task_func\",\"instruct_prompt\":\"Calculate the mean value of each row in a 2D data matrix, run a t-test from a sample against the population value, and record the mean values that differ significantly. - Create a lineplot with the mean of rows in red. Its label is 'Means'. - Create a line plot with the significant_indices (those with a pvalue less than ALPHA) on the x-axis and the corresponding means on the y-axis. This plot should be blue. Its label is 'Significant Means'. - Create an horizontal line which represent the mean computed on the whole 2D matrix. It should be in green. Its label is 'Population Mean'. Example 2: >>> data = np.array([[1, 2, 3], [4, 5, 6], [7, 8, 9]]) >>> indices, ax = task_func(data) >>> print(indices) []\\nThe function should output with:\\n    tuple: A tuple containing:\\n    list: A list of indices of the means that are significantly different from the population mean.\\n    Axes: The plot showing the means and significant means.\\nYou should write self-contained code starting with:\\n```\\nimport numpy as np\\nfrom scipy.stats import ttest_1samp\\nimport matplotlib.pyplot as plt\\n# Constants\\nALPHA = 0.05\\ndef task_func(data_matrix):\\n```\",\"libs\":\"['numpy', 'matplotlib', 'scipy']\"}","display_format":"code","language":"","answer_status":"published","assets":[],"source_url":"https://bigcode-bench.github.io/","history":"initial import","indexing_mode":"noindex","subproblems":[],"grids":[]}