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 | |
import matplotlib.pyplot as plt | |
from scipy.spatial import Voronoi | |
def voronoi_finite_polygons_2d(vor, radius=None): | |
""" | |
Reconstruct infinite voronoi regions in a 2D diagram to finite | |
regions. | |
Parameters |
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
r""" | |
Show how to compute a derivative spline. | |
Scipy's splines are represented in terms of the standard B-spline basis | |
functions. In short, a spline of degree ``k`` is represented in terms of the | |
knots ``t`` and coefficients ``c`` by: | |
.. math:: | |
s(x) = \sum_{j=-\infty}^\infty c_{j} B^k_{j}(x) |
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 | |
import scipy.linalg.blas | |
cdef extern from "f2pyptr.h": | |
void *f2py_pointer(object) except NULL | |
ctypedef int dgemm_t( | |
char *transa, char *transb, | |
int *m, int *n, int *k, | |
double *alpha, |
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
# -*- 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 |
NewerOlder