Skip to content

Instantly share code, notes, and snippets.

View rgommers's full-sized avatar

Ralf Gommers rgommers

View GitHub Profile
@rgommers
rgommers / tutorial_KDE.py
Created December 29, 2011 15:15
Kernel Density Estimation with SciPy
# -*- coding: utf-8 -*-
# <nbformat>2</nbformat>
# <markdowncell>
# Kernel Density Estimation with SciPy
# ====================================
# <codecell>
@rgommers
rgommers / config.log
Created February 19, 2012 20:58
config.log for NumPy crash with Bento build
----------------------------------------
Checking for 'gcc' (c compiler)
find program=['gcc', 'cc'] paths=['/Library/Frameworks/Python.framework/Versions/2.6/bin', '/Users/rgommers/Code/tmp/gpp40temp', '/Library/Frameworks/Python.framework/Versions/2.6/bin', '/Library/Frameworks/Python.framework/Versions/2.7/bin', '/Library/Frameworks/Python.framework/Versions/2.5/bin', '/Users/rgommers/wine/wine-1.1.39/bin', '/usr/local/bin', '/usr/bin', '/bin', '/usr/sbin', '/sbin', '/usr/local/bin', '/usr/local/git/bin', '/usr/texbin', '/usr/X11/bin'] var='CC' -> '/usr/bin/gcc'
find program=['ar'] paths=['/Library/Frameworks/Python.framework/Versions/2.6/bin', '/Users/rgommers/Code/tmp/gpp40temp', '/Library/Frameworks/Python.framework/Versions/2.6/bin', '/Library/Frameworks/Python.framework/Versions/2.7/bin', '/Library/Frameworks/Python.framework/Versions/2.5/bin', '/Users/rgommers/wine/wine-1.1.39/bin', '/usr/local/bin', '/usr/bin', '/bin', '/usr/sbin', '/sbin', '/usr/local/bin', '/usr/local/git/bin', '/usr/texbin', '/usr
@rgommers
rgommers / time_norminvgauss_ppf
Created August 28, 2013 20:45
Timing of stats.norminvgauss.ppf
In [16]: %lprun -f _cdf -f _cdf_sc -f _ppf -f _ppf_sc ppf(x, 2, -1)
Timer unit: 1e-06 s
File: /home/rgommers/Code/scipy/scipy/stats/distributions.py
Function: _ppf_single_call at line 1133
Total time: 2.63388 s
Line # Hits Time Per Hit % Time Line Contents
@rgommers
rgommers / gist:9446293
Created March 9, 2014 11:17
sparsetools build errors pr-3440 on OS X 10.9
building 'scipy.sparse._csparsetools' extension
compiling C sources
C compiler: cc -fno-strict-aliasing -fno-common -dynamic -I/usr/local/include -I/usr/local/opt/sqlite/include -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes
compile options: '-I/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include -I/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c'
cc: scipy/sparse/_csparsetools.c
In file included from scipy/sparse/_csparsetools.c:340:
In file included from /usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include/numpy/arrayobject.h:4:
In file included from /usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:17:
In file included from /usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include
@rgommers
rgommers / gist:9446340
Created March 9, 2014 11:22
sparsetoold build errors for pr-3340 on OS X 10.6
building 'scipy.sparse._csparsetools' extension
compiling C sources
C compiler: gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -isysroot /Developer/SDKs/MacOSX10.6.sdk -arch i386 -arch x86_64 -g -O2 -DNDEBUG -g -O3
compile options: '-I/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/numpy/core/include -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c'
gcc-4.2: scipy/sparse/_csparsetools.c
In file included from /Developer/SDKs/MacOSX10.6.sdk/usr/include/architecture/i386/math.h:626,
from /Developer/SDKs/MacOSX10.6.sdk/usr/include/math.h:28,
from /Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/pyport.h:312,
from /Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/Python.h:58,
@rgommers
rgommers / gist:9590685
Created March 16, 2014 22:20
blvs build error with MinGW 3.4.5 (g77)
building 'scipy.optimize._bvls' extension
compiling C sources
C compiler: gcc -mno-cygwin -O2 -Wall -Wstrict-prototypes
compile options: '-Ibuild\src.win32-2.7 -IC:\Python27\lib\site-packages\numpy\core\include -IC:\Python27\include -IC:\Python27\PC -c'
gcc -mno-cygwin -O2 -Wall -Wstrict-prototypes -Ibuild\src.win32-2.7 -IC:\Python27\lib\site-packages\numpy\core\include -IC:\Python27\include -IC:\Python27\PC -c build\src.win32-2.7\fortranobject.c -o build\temp.win32-2.7\Release\build\src.win32-2.7\fortranobject.o
Found executable C:\MinGW\bin\gcc.exe
gcc -mno-cygwin -O2 -Wall -Wstrict-prototypes -Ibuild\src.win32-2.7 -IC:\Python27\lib\site-packages\numpy\core\include -IC:\Python27\include -IC:\Python27\PC -c build\src.win32-2.7\scipy\optimize\bvls\_bvlsmodule.c -o build\temp.win32-2.7\Release\build\src.win32-2.7\scipy\optimize\bvls\_bvlsmodule.o
compiling Fortran sources
Fortran f77 compiler: C:\MinGW\bin\g77.exe -g -Wall -fno-second-underscore -mno-cygwin -O3 -funroll-loops
@rgommers
rgommers / gist:9608237
Created March 17, 2014 20:59
crash ordered QZ decomp (PR 3107), py32-sse3, MinGW
test_cef (test_decomp.TestOrdQZ) ... wine: Unhandled page fault on read access to 0xffffffff at address 0x1b9ed45 (thread 001e), starting debugger...
Unhandled exception: page fault on read access to 0xffffffff in 32-bit code (0x01b9ed45).
Register dump:
CS:0017 SS:001f DS:001f ES:001f FS:1007 GS:0037
EIP:01b9ed45 ESP:0041c3c4 EBP:00000001 EFLAGS:00010202( R- -- I - - - )
EAX:0041cb34 EBX:0041cb34 ECX:00000001 EDX:00000040
ESI:0041cb14 EDI:00000006
Stack dump:
0x0041c3c4: 00000006 00000040 0041cb34 00000010
0x0041c3d4: 0041cb34 035d7a00 00000008 01b9f59f
@rgommers
rgommers / numfocus_dot_org_issue
Created June 25, 2014 20:51
numfocus.org make devserver output
Traceback (most recent call last): File "<string>", line 1, in <module> ImportError: No module named virtualenvwrapper.hook_loader virtualenvwrapper.sh: There was a problem running the initialization hooks. If Python could not import the module virtualenvwrapper.hook_loader, check that virtualenv has been installed for VIRTUALENVWRAPPER_PYTHON=/usr/bin/python and that PATH is set properly. rgommers@machine:~/Code/numfocus/numfocus.org (master)$ make devserver /home/rgommers/Code/numfocus/numfocus.org/develop_server.sh restart cat: /home/rgommers/Code/numfocus/numfocus.org/srv.pid: No such file or directory pelican.server PIDFile not found cat: /home/rgommers/Code/numfocus/numfocus.org/pelican.pid: No such file or directory Pelican PIDFile not found Starting up Pelican and pelican.server /home/rgommers/Code/numfocus/numfocus.org/develop_server.sh: line 68: cd: /home/rgommers/Code/numfocus/numfocus.org/output: No such file or directory WARNING: Feeds generated without SITEURL set properly may not be valid W
@rgommers
rgommers / aix_build_log_numpy191
Created January 27, 2015 19:24
numpy 1.9.1 AIX build log issue (after fixing npysort include order)
(numpy-env)bash-4.2# export CC=gcc
(numpy-env)bash-4.2# python setup.py build --compile=unix
Running from numpy source directory.
/opt/freeware/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'test_suite'
warnings.warn(msg)
non-existing path in 'numpy/distutils': 'site.cfg'
non-existing path in 'numpy/f2py': 'docs'
non-existing path in 'numpy/f2py': 'f2py.1'
/bin/sh: svnversion: not found.
F2PY Version 2
@rgommers
rgommers / gist:e06508dfa444b179411c
Created May 8, 2015 06:12
g77 build issue for scipy.linalg Cython API
g77.exe:f77: scipy\linalg\_blas_subroutine_wrappers.f
g77.exe:f77: scipy\linalg\_lapack_subroutine_wrappers.f
g77.exe:f77: Z:\home\vagrant\repos\scipy\scipy\_build_utils\src\wrap_dummy_g77_abi.f
g77.exe:f77: Z:\home\vagrant\repos\scipy\scipy\_build_utils\src\wrap_dummy_accelerate.f
ar: adding 4 object files to build\temp.win32-2.7\libfwrappers.a
Found executable C:\MinGW\bin\gcc.exe
C:\MinGW\bin\g77.exe -g -Wall -mno-cygwin -g -Wall -mno-cygwin -shared build\temp.win32-2.7\Release\scipy\linalg\cython_blas.o -LC:\local\lib\atlas\nosse -LC:\MinGW\lib -LC:\MinGW\lib\gcc\mingw32\3.4.5 -LC:\Python27\libs -LC:\Python27\PCbuild -Lbuild\temp.win32-2.7 -lfwrappers -llapack -lblas -lpython27 -lg2c -o build\lib.win32-2.7\scipy\linalg\cython_blas.pyd