Commit 43490fe3 authored by Christoph Groth's avatar Christoph Groth

update README and metadata, append rst extensions to files

parent 55a93184
......@@ -2,7 +2,7 @@
Tinyarray License
=================
Copyright 2012-2013 Christoph Groth (CEA) and others. All rights reserved.
Copyright 2012-2015 Christoph Groth (CEA) and others. All rights reserved.
(CEA = Commissariat à l'énergie atomique et aux énergies alternatives)
......
......@@ -2,8 +2,7 @@
# in addition to the default ones.
include MANIFEST.in
include LICENSE
include TODO
include LICENSE.rst
include README_WINDOWS.txt
include test_tinyarray.py
include benchmark.py
......
Tinyarray
=========
Tinyarrays are similar to NumPy arrays, but optimized for small sizes. Common
operations on very small arrays are up to 35 times faster than with NumPy, and 3
times less memory is used to store them. Tinyarrays are useful if you need many
small arrays of numbers, and cannot combine them into a few large ones. (The
resulting code is still much slower than C, but it may now be fast enough.)
Tinyarrays are similar to NumPy arrays, but optimized for small sizes.
Common operations on very small arrays are to 3-7 times faster than with
NumPy (with NumPy 1.6 it used to be up to 35 times), and 3 times less
memory is used to store them. Tinyarrays are useful if you need many
small arrays of numbers, and cannot combine them into a few large ones.
(The resulting code is still much slower than C, but it may now be fast
enough.)
Unlike Python's built-in tuples, Tinyarrays support mathematical operations like
element-wise addition and matrix multiplication. Unlike Numpy arrays,
Tinyarrays can be used as dictionary keys because they are hashable and
immutable.
Unlike Python's built-in tuples, Tinyarrays support mathematical
operations like element-wise addition and matrix multiplication. Unlike
Numpy arrays, Tinyarrays can be used as dictionary keys because they are
hashable and immutable.
The module's interface is a subset of that of NumPy and thus should be familiar
to many. Whenever an operation is missing from Tinyarray, NumPy functions can
be used directly with Tinyarrays.
The module's interface is a subset of that of NumPy and thus should be
familiar to many. Whenever an operation is missing from Tinyarray,
NumPy functions can be used directly with Tinyarrays.
Tinyarray is licensed under the "simplified BSD License". See `<LICENSE>`_.
Tinyarray is licensed under the "simplified BSD License". See
`<LICENSE.rst>`_.
Website: http://git.kwant-project.org/tinyarray/about/
Website: https://gitlab.kwant-project.org/kwant/tinyarray
Please report bugs here:
https://gitlab.kwant-project.org/kwant/tinyarray/issues
Source code
......@@ -29,7 +35,7 @@ Source tarballs are available at http://downloads.kwant-project.org/tinyarray/
Clone the Git repository with ::
git clone http://git.kwant-project.org/tinyarray
git clone https://gitlab.kwant-project.org/kwant/tinyarray.git
Installation
......@@ -37,11 +43,11 @@ Installation
You can build from source with the usual ::
python setup.py install
pip install tinyarray
Another possibility is to use ::
You can also download the source tarball (or clone it from git) and use ::
pip install tinyarray
python setup.py install
Prepared packages exist for
......
A note for users of Microsoft Windows
-------------------------------------
To read the text files in this directory (README, LICENSE, etc.), right-click,
choose "Open", and open with "WordPad". ("Notepad" will not display the files
properly.)
To read the text files in this directory (README.rst, LICENSE.rst,
etc.), right-click, choose "Open", and open with "WordPad".
("Notepad" will not display the files properly.)
Roughly in order of importance:
* Add docstrings.
* Implement indexing of sub-arrays (i.e. a[0] for a 2d-array), perhaps even slicing.
* Implement missing arithmetic operations.
* Implement missing comparisons.
* 0-d arrays should not be sequences. Currently there are problems with using
0-d arrays with PySequence_Fast.
* Merge array_from_arraylike and matrix_from_arraylike.
* Optimize readin_arraylike for elements that are tinyarrays.
* Implement concatenate.
......@@ -3,10 +3,11 @@
# Copyright 2012-2015 Tinyarray authors.
#
# This file is part of Tinyarray. It is subject to the license terms in the
# LICENSE file found in the top-level directory of this distribution and at
# http://git.kwant-project.org/tinyarray/about/LICENSE. A list of Tinyarray
# authors can be found in the README file at the top-level directory of this
# distribution and at http://git.kwant-project.org/tinyarray/about/.
# file LICENSE.rst found in the top-level directory of this distribution and
# at https://gitlab.kwant-project.org/kwant/tinyarray/blob/master/LICENSE.rst.
# A list of Tinyarray authors can be found in the README.rst file at the
# top-level directory of this distribution and at
# https://gitlab.kwant-project.org/kwant/tinyarray.
import subprocess
import os
......@@ -17,7 +18,7 @@ from distutils.errors import DistutilsError, DistutilsModuleError
from setuptools.command.build_ext import build_ext
from setuptools.command.sdist import sdist
README_FILE = 'README'
README_FILE = 'README.rst'
SAVED_VERSION_FILE = 'version'
VERSION_HEADER = ['src', 'version.hh']
......@@ -168,7 +169,7 @@ def main():
author_email='christoph.groth@cea.fr',
description="Arrays of numbers for Python, optimized for small sizes",
long_description=long_description(),
url="http://git.kwant-project.org/tinyarray/about/",
url="https://gitlab.kwant-project.org/kwant/tinyarray",
download_url="http://downloads.kwant-project.org/tinyarray/",
license="Simplified BSD license",
platforms=["Unix", "Linux", "Mac OS-X", "Windows"],
......
// Copyright 2012-2013 Tinyarray authors.
//
// This file is part of Tinyarray. It is subject to the license terms in the
// LICENSE file found in the top-level directory of this distribution and at
// http://git.kwant-project.org/tinyarray/about/LICENSE. A list of Tinyarray
// authors can be found in the README file at the top-level directory of this
// distribution and at http://git.kwant-project.org/tinyarray/about/.
// file LICENSE.rst found in the top-level directory of this distribution and
// at https://gitlab.kwant-project.org/kwant/tinyarray/blob/master/LICENSE.rst.
// A list of Tinyarray authors can be found in the README.rst file at the
// top-level directory of this distribution and at
// https://gitlab.kwant-project.org/kwant/tinyarray.
#include <Python.h>
#include <limits>
......
// Copyright 2012-2013 Tinyarray authors.
//
// This file is part of Tinyarray. It is subject to the license terms in the
// LICENSE file found in the top-level directory of this distribution and at
// http://git.kwant-project.org/tinyarray/about/LICENSE. A list of Tinyarray
// authors can be found in the README file at the top-level directory of this
// distribution and at http://git.kwant-project.org/tinyarray/about/.
// file LICENSE.rst found in the top-level directory of this distribution and
// at https://gitlab.kwant-project.org/kwant/tinyarray/blob/master/LICENSE.rst.
// A list of Tinyarray authors can be found in the README.rst file at the
// top-level directory of this distribution and at
// https://gitlab.kwant-project.org/kwant/tinyarray.
#ifndef ARITHMETIC_HH
#define ARITHMETIC_HH
......
// Copyright 2012-2013 Tinyarray authors.
//
// This file is part of Tinyarray. It is subject to the license terms in the
// LICENSE file found in the top-level directory of this distribution and at
// http://git.kwant-project.org/tinyarray/about/LICENSE. A list of Tinyarray
// authors can be found in the README file at the top-level directory of this
// distribution and at http://git.kwant-project.org/tinyarray/about/.
// file LICENSE.rst found in the top-level directory of this distribution and
// at https://gitlab.kwant-project.org/kwant/tinyarray/blob/master/LICENSE.rst.
// A list of Tinyarray authors can be found in the README.rst file at the
// top-level directory of this distribution and at
// https://gitlab.kwant-project.org/kwant/tinyarray.
#include <Python.h>
#include <cstddef>
......
// Copyright 2012-2013 Tinyarray authors.
//
// This file is part of Tinyarray. It is subject to the license terms in the
// LICENSE file found in the top-level directory of this distribution and at
// http://git.kwant-project.org/tinyarray/about/LICENSE. A list of Tinyarray
// authors can be found in the README file at the top-level directory of this
// distribution and at http://git.kwant-project.org/tinyarray/about/.
// file LICENSE.rst found in the top-level directory of this distribution and
// at https://gitlab.kwant-project.org/kwant/tinyarray/blob/master/LICENSE.rst.
// A list of Tinyarray authors can be found in the README.rst file at the
// top-level directory of this distribution and at
// https://gitlab.kwant-project.org/kwant/tinyarray.
#ifndef ARRAY_HH
#define ARRAY_HH
......
// Copyright 2012-2013 Tinyarray authors.
//
// This file is part of Tinyarray. It is subject to the license terms in the
// LICENSE file found in the top-level directory of this distribution and at
// http://git.kwant-project.org/tinyarray/about/LICENSE. A list of Tinyarray
// authors can be found in the README file at the top-level directory of this
// distribution and at http://git.kwant-project.org/tinyarray/about/.
// file LICENSE.rst found in the top-level directory of this distribution and
// at https://gitlab.kwant-project.org/kwant/tinyarray/blob/master/LICENSE.rst.
// A list of Tinyarray authors can be found in the README.rst file at the
// top-level directory of this distribution and at
// https://gitlab.kwant-project.org/kwant/tinyarray.
#ifndef CONVERSION_HH
#define CONVERSION_HH
......
// Copyright 2012-2013 Tinyarray authors.
//
// This file is part of Tinyarray. It is subject to the license terms in the
// LICENSE file found in the top-level directory of this distribution and at
// http://git.kwant-project.org/tinyarray/about/LICENSE. A list of Tinyarray
// authors can be found in the README file at the top-level directory of this
// distribution and at http://git.kwant-project.org/tinyarray/about/.
// file LICENSE.rst found in the top-level directory of this distribution and
// at https://gitlab.kwant-project.org/kwant/tinyarray/blob/master/LICENSE.rst.
// A list of Tinyarray authors can be found in the README.rst file at the
// top-level directory of this distribution and at
// https://gitlab.kwant-project.org/kwant/tinyarray.
#include <Python.h>
#include "array.hh"
......
// Copyright 2012-2013 Tinyarray authors.
//
// This file is part of Tinyarray. It is subject to the license terms in the
// LICENSE file found in the top-level directory of this distribution and at
// http://git.kwant-project.org/tinyarray/about/LICENSE. A list of Tinyarray
// authors can be found in the README file at the top-level directory of this
// distribution and at http://git.kwant-project.org/tinyarray/about/.
// file LICENSE.rst found in the top-level directory of this distribution and
// at https://gitlab.kwant-project.org/kwant/tinyarray/blob/master/LICENSE.rst.
// A list of Tinyarray authors can be found in the README.rst file at the
// top-level directory of this distribution and at
// https://gitlab.kwant-project.org/kwant/tinyarray.
#ifndef FUNCTIONS_HH
#define FUNCTIONS_HH
......
# Copyright 2012-2015 Tinyarray authors.
#
# This file is part of Tinyarray. It is subject to the license terms in the
# file LICENSE.rst found in the top-level directory of this distribution and
# at https://gitlab.kwant-project.org/kwant/tinyarray/blob/master/LICENSE.rst.
# A list of Tinyarray authors can be found in the README.rst file at the
# top-level directory of this distribution and at
# https://gitlab.kwant-project.org/kwant/tinyarray.
import operator, warnings
import tinyarray as ta
from nose.tools import assert_raises
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment