{"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":"1268c156-c89d-59ef-a072-df2ddee09769","task_key":"default--v0~2e1~2e0~5fhf--1268c156-c89d-59ef-a072-df2ddee09769","task_revision_id":"1","upstream_id":"","short_description":"BigCodeBench v0.1.0_hf 1268c156-c89d-59ef-a072-df2ddee09769","config":"default","split":"v0.1.0_hf","body":"{\"code_prompt\":\"import numpy as np\\nimport matplotlib.pyplot as plt\\nfrom scipy.fft import fft\\ndef task_func(signal, precision=2, seed=777):\\n\",\"complete_prompt\":\"import numpy as np\\nimport matplotlib.pyplot as plt\\nfrom scipy.fft import fft\\n\\n\\ndef task_func(signal, precision=2, seed=777):\\n    \\\"\\\"\\\"\\n    Calculate the one-dimensional discrete N-point Fourier Transform (DFT) for a real or complex sequence (signal) \\n    using the Fast Fourier Transform (FFT) algorithm. Plot the original signal and the transformed signal, rounding \\n    the transformed signal values to the specified accuracy. The title of the plots will be 'Original Signal' and 'Transformed Signal'.\\n\\n    Parameters:\\n    - signal (array): An array representing the signal.\\n    - precision (int, optional): The number of decimal places to which to round the transformed signal values. \\n                                 Defaults to 2.\\n    - seed (int, optional): The seed for the random number generator. Defaults to 777.\\n\\n    Returns:\\n    - ndarray: A numpy array of transformed signal values (rounded to the specified precision).\\n    - tuple: A tuple containing the Axes objects for the original signal and transformed signal plots.\\n\\n    Requirements:\\n    - numpy\\n    - matplotlib\\n    - scipy\\n\\n    Example:\\n    >>> signal = np.array([0., 1., 0., -1.])\\n    >>> transformed_signal, (ax1, ax2) = task_func(signal)\\n    >>> print(transformed_signal)\\n    [0.-0.j 0.-2.j 0.-0.j 0.+2.j]\\n    \\\"\\\"\\\"\\n\",\"entry_point\":\"task_func\",\"instruct_prompt\":\"Calculate the one-dimensional discrete N-point Fourier Transform (DFT) for a real or complex sequence (signal) using the Fast Fourier Transform (FFT) algorithm. Plot the original signal and the transformed signal, rounding the transformed signal values to the specified accuracy. The title of the plots will be 'Original Signal' and 'Transformed Signal'.\\nThe function should output with:\\n    ndarray: A numpy array of transformed signal values (rounded to the specified precision).\\n    tuple: A tuple containing the Axes objects for the original signal and transformed signal plots.\\nYou should write self-contained code starting with:\\n```\\nimport numpy as np\\nimport matplotlib.pyplot as plt\\nfrom scipy.fft import fft\\ndef task_func(signal, precision=2, seed=777):\\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":"index","subproblems":[],"grids":[]}