benchmarks.wiki / Public workspace

BigCodeBench / BigCodeBench v0.1.0_hf b21d6833-b6af-5518-ad6e-d1361ce312f3

Problem

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

complete prompt

import numpy as np
import math

def task_func(L):
    """
    Calculate the median of all elements in a nested list 'L'.
    
    Parameters:
    - L (list): The nested list.
    
    Returns:
    - median (float): The median.
    
    Requirements:
    - numpy
    - math

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

instruct prompt

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

Code

import numpy as np
import math
def task_func(L):

code prompt

Code

import numpy as np
import math
def task_func(L):

entry point

task_func

libs

  • math
  • numpy

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