File: task_mod.py

package info (click to toggle)
ipyparallel 8.8.0-6
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 12,412 kB
  • sloc: python: 21,991; javascript: 267; makefile: 29; sh: 28
file content (8 lines) | stat: -rw-r--r-- 158 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
import numpy
from numpy.linalg import norm


def task(n):
    """Generates a 1xN array and computes its 2-norm"""
    A = numpy.ones(n)
    return norm(A, 2)