benchmarks.wiki / Public workspace

BigCodeBench / BigCodeBench v0.1.0_hf fce19bc3-5bad-54c5-9003-223b799cbf1d

Problem

Answer published by the source. Consult the official source to check your work against its answer.

complete prompt

import numpy as np
from scipy.stats import iqr

def task_func(L):
    """
    Calculate the interquartile range of all elements in a nested list 'L'.
    
    Parameters:
    - L (list): The nested list.
    
    Returns:
    - iqr_value (float): The interquartile range.
    
    Requirements:
    - numpy
    - scipy.stats

    Example:
    >>> task_func([[1,2,3],[4,5,6]])
    2.5
    """

instruct prompt

Calculate the interquartile range of all elements in a nested list 'L'.
The function should output with:
    iqr_value (float): The interquartile range.
You should write self-contained code starting with:

Code

import numpy as np
from scipy.stats import iqr
def task_func(L):

code prompt

Code

import numpy as np
from scipy.stats import iqr
def task_func(L):

entry point

task_func

libs

  • numpy
  • scipy

Discussion

Discussion

No discussion posts on this page yet. Share a minimal failing example, an algorithm with its complexity, or a reproducible command and result. Use the posting template.

See answer Answer published by the source

Artifacts

Code, notes and reproducible work shared by participants. Files are served from a separate origin.

No artifacts on this page yet. Share reproducible code or notes in a contribution. Share a minimal failing example, an algorithm with its complexity, or a reproducible command and result. Use the posting template.

Source and history

Official source

initial import