{"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":"b47c3167-4090-5dfa-a0dc-53191d45af4b","task_key":"default--v0~2e1~2e0~5fhf--b47c3167-4090-5dfa-a0dc-53191d45af4b","task_revision_id":"1","upstream_id":"","short_description":"BigCodeBench v0.1.0_hf b47c3167-4090-5dfa-a0dc-53191d45af4b","config":"default","split":"v0.1.0_hf","body":"{\"code_prompt\":\"from functools import reduce\\nfrom itertools import combinations\\nimport numpy as np\\ndef task_func(shape=(3, 3), low=1, high=10, seed=None):\\n\",\"complete_prompt\":\"from functools import reduce\\nfrom itertools import combinations\\nimport numpy as np\\n\\n\\ndef task_func(shape=(3, 3), low=1, high=10, seed=None):\\n    \\\"\\\"\\\"\\n    Generate a matrix of specified shape and random numbers within a specified \\n    range. Generate a list of all possible number pairs (all possible combinations of\\n    two numbers which are in the matrix) in the matrix.\\n    Calculate the sum of the products of all pairs.\\n\\n    Parameters:\\n    shape (tuple): Shape of the matrix, default is (3, 3).\\n    low (int): Lower bound of the random number generation, inclusive (default is 1).\\n    high (int): Upper bound of the random number generation, exclusive (default is 10).\\n    seed (int, optional): Seed for the random number generator for reproducible results. If None, the random number \\n                          generator is initialized without a seed (default is None).\\n\\n    Returns:\\n    int: The sum of products of all possible number pairs within the generated matrix.\\n    np.array: The generated matrix.\\n\\n    Raises:\\n    ValueError: If high <= low\\n\\n    Requirements:\\n    - functools.reduce\\n    - itertools.combinations\\n    - numpy\\n\\n    Example:\\n    >>> task_func((2, 2), 1, 5, seed=42)\\n    (43, array([[3, 4],\\n           [1, 3]]))\\n\\n    >>> task_func((5, 4), seed=1)\\n    (4401, array([[6, 9, 6, 1],\\n           [1, 2, 8, 7],\\n           [3, 5, 6, 3],\\n           [5, 3, 5, 8],\\n           [8, 2, 8, 1]]))\\n    \\\"\\\"\\\"\\n\",\"entry_point\":\"task_func\",\"instruct_prompt\":\"Generate a matrix of specified shape and random numbers within a specified range. Generate a list of all possible number pairs (all possible combinations of two numbers which are in the matrix) in the matrix. Calculate the sum of the products of all pairs. >>> task_func((5, 4), seed=1) (4401, array([[6, 9, 6, 1], [1, 2, 8, 7], [3, 5, 6, 3], [5, 3, 5, 8], [8, 2, 8, 1]]))\\nThe function should raise the exception for: ValueError: If high <= low\\nThe function should output with:\\n    int: The sum of products of all possible number pairs within the generated matrix.\\n    np.array: The generated matrix.\\nYou should write self-contained code starting with:\\n```\\nfrom functools import reduce\\nfrom itertools import combinations\\nimport numpy as np\\ndef task_func(shape=(3, 3), low=1, high=10, seed=None):\\n```\",\"libs\":\"['itertools', 'numpy', 'functools']\"}","display_format":"code","language":"","answer_status":"published","assets":[],"source_url":"https://bigcode-bench.github.io/","history":"initial import","indexing_mode":"index","subproblems":[],"grids":[]}