File: task_mod.py

package info (click to toggle)
ipyparallel 9.0.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 9,388 kB
  • sloc: python: 22,769; 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)