Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

  • 0f9a83f
  • /
  • perf_test
  • /
  • perf_test.py
Raw File Download

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
  • directory
content badge
swh:1:cnt:55e93ad11e14aea7ba953375a2693b81c6f730a7
directory badge
swh:1:dir:b81659601070aabe959b33c2af6dd797e35f372d

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • content
  • directory
(requires biblatex-software package)
Generating citation ...
(requires biblatex-software package)
Generating citation ...
perf_test.py
import numpy as np

from PyEMD import EMD


def test_prepare_points_simple(benchmark):
    emd = EMD()
    T_max = 50
    T = np.linspace(0, T_max, 10000)
    S = np.sin(T * 2 * np.pi)
    # max_pos = np.array([0.25, 1.25, 2.25, 3.25], dtype=np.float32)
    max_pos = np.arange(T_max - 1, dtype=np.float32) + 0.25
    max_val = np.ones(T_max - 1, dtype=np.float32)
    min_pos = np.arange(1, T_max, dtype=np.float32) - 0.25
    min_val = (-1) * np.ones(T_max - 1, dtype=np.float32)
    # min_pos = np.array([0.75, 1.75, 2.75, 3.75], dtype=np.float32)
    # min_val = np.array([-1, -1, -1, -1], dtype=np.float32)

    benchmark.pedantic(
        emd.prepare_points_parabol, args=(T, S, max_pos, max_val, min_pos, min_val), iterations=100, rounds=100
    )

back to top

Software Heritage — Copyright (C) 2015–2026, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Content policy— Contact— JavaScript license information— Web API