benchmarks.wiki / Public workspace

BigCodeBench / BigCodeBench v0.1.0_hf 7a1c9ea4-2550-5208-a681-d95de3c17551

Problem

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

complete prompt

import matplotlib.pyplot as plt
import numpy as np
import seaborn as sns


def task_func(mu, sigma, seed=0):
    """
    Draw a normal distribution using a 1000 samples, indicating the mean and standard deviation 
    with a color bar.
    
    Parameters:
    mu (float): The mean of the distribution.
    sigma (float): The standard deviation of the distribution.
    seed (int, Optional): The seed for the random number generator. Defaults to 0.
    
    Returns:
    matplotlib.axes._axes.Axes: The Axes object of the plotted distribution.
    
    Requirements:
    - matplotlib.pyplot
    - numpy
    - seaborn
    
    Example:
    >>> plot = task_func(0, 1)
    >>> type(plot)
    <class 'matplotlib.axes._axes.Axes'>
    """

instruct prompt

Draw a normal distribution using a 1000 samples, indicating the mean and standard deviation with a color bar.
The function should output with:
    matplotlib.axes._axes.Axes: The Axes object of the plotted distribution.
You should write self-contained code starting with:

Code

import matplotlib.pyplot as plt
import numpy as np
import seaborn as sns
def task_func(mu, sigma, seed=0):

code prompt

Code

import matplotlib.pyplot as plt
import numpy as np
import seaborn as sns
def task_func(mu, sigma, seed=0):

entry point

task_func

libs

  • numpy
  • matplotlib
  • seaborn

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