{"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":"00ccb5af-df61-5472-9a82-38b688e94bdc","task_key":"default--v0~2e1~2e0~5fhf--00ccb5af-df61-5472-9a82-38b688e94bdc","task_revision_id":"1","upstream_id":"","short_description":"BigCodeBench v0.1.0_hf 00ccb5af-df61-5472-9a82-38b688e94bdc","config":"default","split":"v0.1.0_hf","body":"{\"code_prompt\":\"import numpy as np\\nimport seaborn as sns\\ndef task_func(P, T):\\n\",\"complete_prompt\":\"import numpy as np\\nimport seaborn as sns\\n\\n\\ndef task_func(P, T):\\n    \\\"\\\"\\\"\\n    Calculate the product of a matrix 'P' and a 3D tensor 'T' using numpy and visualize the results as a heatmap.\\n    Note: This function only accepts numpy matrices/arrays.\\n\\n    Parameters:\\n    - P (numpy.ndarray): Input matrix of shape (M, 3), where M can be any positive integer.\\n    - T (numpy.ndarray): Input tensor of shape (3, 3, 3).\\n\\n    Returns:\\n    - numpy.ndarray: Resultant product after matrix-tensor multiplication.\\n    - matplotlib.axes.Axes: Axes object displaying the heatmap of the 2D result.\\n\\n    Requirements:\\n    - numpy\\n    - seaborn\\n\\n    Example:\\n    >>> np.random.seed(0)\\n    >>> P = np.array([[6, 2, 7], [1, 1, 8]])\\n    >>> T = np.random.rand(3, 3, 3)\\n    >>> product, heatmap = task_func(P, T)\\n    >>> product\\n    array([[[ 9.50686132, 11.96467131, 11.52469849],\\n            [ 9.99949817,  7.62347761,  9.48114103],\\n            [ 3.62770285,  9.87052195,  8.45068927]],\\n    <BLANKLINE>\\n           [[ 7.15750903,  8.46701159,  8.96060503],\\n            [ 7.50619626,  5.04108634,  6.96116358],\\n            [ 1.47091192,  6.03135957,  2.94310891]]])\\n    >>> type(heatmap)\\n    <class 'matplotlib.axes._axes.Axes'>\\n    \\\"\\\"\\\"\\n\",\"entry_point\":\"task_func\",\"instruct_prompt\":\"Calculate the product of a matrix 'P' and a 3D tensor 'T' using numpy and visualize the results as a heatmap.\\nNote that: This function only accepts numpy matrices/arrays.\\nThe function should output with:\\n    numpy.ndarray: Resultant product after matrix-tensor multiplication.\\n    matplotlib.axes.Axes: Axes object displaying the heatmap of the 2D result.\\nYou should write self-contained code starting with:\\n```\\nimport numpy as np\\nimport seaborn as sns\\ndef task_func(P, T):\\n```\",\"libs\":\"['numpy', 'seaborn']\"}","display_format":"code","language":"","answer_status":"published","assets":[],"source_url":"https://bigcode-bench.github.io/","history":"initial import","indexing_mode":"index","subproblems":[],"grids":[]}