8000 ENH: Merge branch 'tmprat' into initial-stuff · numpy/numpy-dtypes@cfca318 · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Nov 25, 2022. It is now read-only.

Commit cfca318

Browse files
committed
ENH: Merge branch 'tmprat' into initial-stuff
* tmprat: (68 commits) Change Python assert to numpy.testing.assert_ Reformat declarations and blocks to match numpy Remove C++ style comments and change inline to NPY_INLINE Disable GIL acquiring by default Convert from C++ to C Strip away everything but rational numbers Add .DS_Store to .gitignore Add one plot output for variable bet equilibria Cache variable bet nash equilibia to allow fast reruns README.md: Add a note about cvxopt being GPL heads-up: Replace C and c with explicit eye/1 heads-up: Remove unnecessary variables from variable bet code heads-up: Allow --bets without --variable Add variable bet Nash equilibrium computation rational: Fix a nondetermistic bug in rational parsing heads-up: Add computation of the limit equity curve vs. always all-in heads-up: Switch to sparse matrices for --donkey heads-up: Add a -p/--profile option for use with --donkey heads-up --donkey: Optionally show worst call hand heads-up: Make -d/--deterministic a clean option ...
2 parents 2bc98a5 + 42073cf commit cfca318

File tree

7 files changed

+1417
-0
lines changed

7 files changed

+1417
-0
lines changed

npytypes/rational/.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
exact
2+
*.E
3+
*.clbuilder
4+
*.pyc
5+
build
6+
*.so
7+
*.dSYM
8+
*.npz
9+
.DS_Store
10+
.*.swp

npytypes/rational/LICENSE

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Copyright 2011, Geoffrey Irving, Eugene d'Eon.
2+
3+
All rights reserved.
4+
5+
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
6+
7+
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
8+
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
9+
3. The name of the author may not be used to endorse or promote products derived from this software without specific prior written permission.
10+
11+
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

npytypes/rational/Makefile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
all: rational.so
2+
3+
rational.so: rational.c
4+
python setup.py build
5+
cp build/lib.*/rational.so .
6+
7+
.PHONY: clean test
8+
9+
clean:
10+
rm -f *.o *.E *.so

npytypes/rational/README.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
Test code for user defined types in Numpy
2+
=========================================
3+
4+
This code implements fixed precision rational numbers exposed to Python as
5+
a test of user-defined type support in Numpy.
6+
7+
### Dependencies
8+
9+
* [python](http://python.org)
10+
* [numpy](http://numpy.scipy.org): Requires a patched version (see below)
11+
* [py.test](http://pytest.org): To run tests
12+
13+
On a Mac, these can be obtained through [MacPorts](http://www.macports.org) via
14+
15+
sudo port install py26-numpy py26-py
16+
17+
The original version of this code exposed several bugs in the (hopefully) old
18+
version of numpy, so if it fails try upgrading numpy. My branch which fixed
19+
all but one of the bugs uncovered is here:
20+
21+
https://github.com/girving/numpy/tree/fixuserloops
22+
23+
These changes should be incorporated in the main numpy git repo fairly soon.
24+
25+
### Usage
26+
27+
To build and run the tests, do
28+
29+
make
30+
py.test

0 commit comments

Comments
 (0)
0