{"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":"b6032d38-0212-5555-a9bc-c85d541d91f5","task_key":"default--v0~2e1~2e0~5fhf--b6032d38-0212-5555-a9bc-c85d541d91f5","task_revision_id":"1","upstream_id":"","short_description":"BigCodeBench v0.1.0_hf b6032d38-0212-5555-a9bc-c85d541d91f5","config":"default","split":"v0.1.0_hf","body":"{\"code_prompt\":\"import numpy as np\\nimport pandas as pd\\nfrom sklearn.preprocessing import StandardScaler\\ndef task_func(P, T):\\n\",\"complete_prompt\":\"import numpy as np\\nimport pandas as pd\\nfrom sklearn.preprocessing import StandardScaler\\n\\n\\ndef task_func(P, T):\\n    \\\"\\\"\\\"\\n    Calculate the product of matrix \\\"P\\\" and 3D tensor \\\"T\\\" then return dataframe of normalized results.\\n\\n    This function performs matrix-tensor multiplication between a matrix \\\"P\\\" and a 3D tensor \\\"T\\\" using numpy.\\n    It checks if the shapes of P and T are compatible for multiplication, raising a ValueError if they are not.\\n    The function then normalizes the resulting 2D array using sklearn's StandardScaler. The final output\\n    is returned as a pandas DataFrame, with columns named feature_0, feature_1, ..., feature_n,\\n    where n is the number of features in the flattened result of the matrix-tensor multiplication.\\n\\n    Parameters:\\n    - P (numpy.ndarray): The input matrix. Must not be empty.\\n    - T (numpy.ndarray): The input tensor. Must not be empty.\\n\\n    Returns:\\n    pandas.DataFrame: A DataFrame with the normalized result.\\n\\n    Requirements:\\n    - numpy\\n    - pandas\\n    - sklearn.preprocessing\\n\\n    Example:\\n    >>> np.random.seed(0)\\n    >>> P = np.array([[6, 2, 7], [1, 1, 8], [8, 7, 1], [9, 6, 4], [2, 1, 1]])\\n    >>> T = np.random.rand(3, 5, 5)\\n    >>> result = task_func(P, T)\\n    >>> type(result)\\n    <class 'pandas.core.frame.DataFrame'>\\n    >>> result.head(2)\\n       feature_0  feature_1  feature_2  ...  feature_22  feature_23  feature_24\\n    0   0.214791   0.220904   1.697850  ...    1.768847   -1.759510   -0.003527\\n    1  -0.652336   1.064228  -0.707134  ...   -0.036116    1.002544   -0.813796\\n    <BLANKLINE>\\n    [2 rows x 25 columns]\\n    \\\"\\\"\\\"\\n\",\"entry_point\":\"task_func\",\"instruct_prompt\":\"Calculate the product of matrix \\\"P\\\" and 3D tensor \\\"T\\\" then return dataframe of normalized results. This function performs matrix-tensor multiplication between a matrix \\\"P\\\" and a 3D tensor \\\"T\\\" using numpy. It checks if the shapes of P and T are compatible for multiplication, raising a ValueError if they are not. The function then normalizes the resulting 2D array using sklearn's StandardScaler. The final output is returned as a pandas DataFrame, with columns named feature_0, feature_1, ..., feature_n, where n is the number of features in the flattened result of the matrix-tensor multiplication.\\nThe function should output with:\\n    pandas.DataFrame: A DataFrame with the normalized result.\\nYou should write self-contained code starting with:\\n```\\nimport numpy as np\\nimport pandas as pd\\nfrom sklearn.preprocessing import StandardScaler\\ndef task_func(P, T):\\n```\",\"libs\":\"['pandas', '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":[]}