This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding:utf-8 -*- | |
from __future__ import division, absolute_import, print_function | |
import sys | |
import math | |
import collections | |
try: | |
from math import inf, nan | |
except ImportError: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Timeit asv benchmark setup() routines, look for slow ones. | |
Looks for benchmarks under './benchmarks/' directory. | |
""" | |
import os | |
import time | |
import itertools | |
import tempfile | |
import shutil |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ make diff | |
... | |
$ make diff | |
make -s run "PYTHON=/home/pauli/prj/scipy/cutestrunpy/env/bin/python" "SCRIPT=cutest_slsqp.py" PYCUTEST_CACHE="/home/pauli/prj/scipy/cutestrunpy/cache/installed" 2>&1|tee run-installed.log | |
1.1.0 | |
============================================================== | |
| name | nit | nfev |success |cons_ok |ok_trust_constr| | |
-------------------------------------------------------------- | |
| HS7 | 11 | 14 | 1 | 1 | 1 | | |
| HS10 | 11 | 12 | 1 | 1 | 1 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ pypy3 | |
Python 3.5.3 (47bcad155e44, Mar 30 2018, 19:05:26) | |
[PyPy 5.11.0-alpha0 with GCC 7.3.1 20180303 (Red Hat 7.3.1-5)] on linux | |
$ OPT="-O0 -ggdb" pypy3 -mpip install numpy==1.14.2 | |
$ cat runthis.py | |
import numpy as np | |
print(np.__file__, np.__version__) | |
x = np.zeros([1], dtype=int) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Makefile for running LAPACK testsuite | |
# | |
FC = gfortran | |
FFLAGS = -O2 | |
LDFLAGS = | |
LIBS = -llapack -lblas | |
LD = $(FC) | |
AR = ar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
! testdpotr_test_gh_2691.f90 | |
! | |
! Direct Fortran translation of the Scipy test | |
! TestDpotr.test_gh_2691 | |
! | |
subroutine garbage(okflag) | |
implicit none | |
integer, intent(out) :: okflag | |
double precision, dimension(3,3) :: a, a2 | |
integer, parameter :: lwork = 100 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
numpy/benchmarks$ asv --version | |
asv 0.3.dev1069+3f14e671 | |
numpy/benchmarks$ time asv run -E existing --bench bench_core | |
· Discovering benchmarks | |
· Running 29 total benchmarks (1 commits * 1 environments * 29 benchmarks) | |
[ 0.00%] ·· Building for existing-py_usr_bin_python | |
[ 0.00%] ·· Benchmarking existing-py_usr_bin_python | |
[ 3.45%] ··· Running bench_core.Core.time_arange_100 525.16ns | |
[ 6.90%] ··· Running bench_core.Core.time_array_1 343.88ns | |
[ 10.34%] ··· Running bench_core.Core.time_array_empty 545.93ns |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdlib.h> | |
#include <libqhull_r/libqhull_r.h> | |
static double points[] = { | |
0.16577534087020684, -1.4005379279472099, | |
1.3471447295999897, 0.1881148811227809, | |
1.2882417449678667, -2.2184892610712645, | |
105.76092199244057, -78.34866809894842, | |
-1.4890379590829337, -0.19466063858976068, |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
from math import sin, pi | |
from scipy.integrate import quad | |
def remainder_map(a, b, xs, xe): | |
period = xe - xs | |
interval = b - a | |
n_periods, left = divmod(interval, period) |
NewerOlder