benchmarks.wiki / Public workspace

BigCodeBench / BigCodeBench v0.1.0_hf 09cd152e-ab38-59f0-a32a-7742b7a1eb9c

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 import stats

def task_func(L):
    '''
    Calculate the mode of all elements in a nested list 'L'.
    
    Parameters:
    L (list): The nested list.
    
    Returns:
    - mode (int): The mode.
    
    Requirements:
    - numpy
    - scipy.stats

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

instruct prompt

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

Code

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

code prompt

Code

import numpy as np
from scipy import stats
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