benchmarks.wiki / Public workspace

BigCodeBench / BigCodeBench v0.1.0_hf abb78e8c-b3b4-5e41-8e8d-b1a53e1ee700

Problem

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

complete prompt

from itertools import chain
import numpy as np
from sklearn.preprocessing import StandardScaler
import matplotlib.pyplot as plt


def task_func(L):
    '''
    Convert a list of lists 'L' into a single list of integers, standardize the integers, and plot the standardized values.

    Parameters:
    L (list of lists): A list of lists where each sublist contains integers.
    
    Returns:
    matplotlib.axes._axes.Axes: A plot displaying the standardized values.

    Requirements:
    - numpy
    - itertools
    - sklearn.preprocessing
    - matplotlib.pyplot

    Examples:
    >>> ax = task_func([[1, 2, 3], [4, 5, 6], [7, 8, 9]])
    '''

instruct prompt

Convert a list of lists 'L' into a single list of integers, standardize the integers, and plot the standardized values.
The function should output with:
    matplotlib.axes._axes.Axes: A plot displaying the standardized values.
You should write self-contained code starting with:

Code

from itertools import chain
import numpy as np
from sklearn.preprocessing import StandardScaler
import matplotlib.pyplot as plt
def task_func(L):

code prompt

Code

from itertools import chain
import numpy as np
from sklearn.preprocessing import StandardScaler
import matplotlib.pyplot as plt
def task_func(L):

entry point

task_func

libs

  • matplotlib
  • numpy
  • itertools
  • sklearn

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