8000 Merge pull request #1 from charris/initial-stuff · numpy/numpy-dtypes@a773d06 · 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 a773d06

Browse files
committed
Merge pull request #1 from charris/initial-stuff
Initial stuff
2 parents 2bc98a5 + 8e18ac4 commit a773d06

File tree

6 files changed

+1464
-0
lines changed

6 files changed

+1464
-0
lines changed

npytypes/rational/LICENSE

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
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
6+
modification, are permitted provided that the following conditions are met:
7+
8+
1. Redistributions of source code must retain the above copyright notice,
9+
this list of conditions and the following disclaimer.
10+
2. Redistributions in binary form must reproduce the above copyright
11+
notice, this list of conditions and the following disclaimer in the
12+
documentation and/or other materials provided with the distribution.
13+
3. The name of the author may not be used to endorse or promote products
14+
derived from this software without specific prior written permission.
15+
16+
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
17+
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
18+
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN
19+
NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
21+
TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
22+
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
23+
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
24+
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25+
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