Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
T
tinyarray
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jörg Behrmann
tinyarray
Commits
43490fe3
Commit
43490fe3
authored
Nov 08, 2015
by
Christoph Groth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update README and metadata, append rst extensions to files
parent
55a93184
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
80 additions
and
77 deletions
+80
-77
LICENSE.rst
LICENSE.rst
+1
-1
MANIFEST.in
MANIFEST.in
+1
-2
README.rst
README.rst
+24
-18
README_WINDOWS.txt
README_WINDOWS.txt
+3
-3
TODO
TODO
+0
-18
setup.py
setup.py
+7
-6
src/arithmetic.cc
src/arithmetic.cc
+5
-4
src/arithmetic.hh
src/arithmetic.hh
+5
-4
src/array.cc
src/array.cc
+5
-5
src/array.hh
src/array.hh
+5
-4
src/conversion.hh
src/conversion.hh
+5
-4
src/functions.cc
src/functions.cc
+5
-4
src/functions.hh
src/functions.hh
+5
-4
test_tinyarray.py
test_tinyarray.py
+9
-0
No files found.
LICENSE
→
LICENSE
.rst
View file @
43490fe3
...
...
@@ -2,7 +2,7 @@
Tinyarray License
=================
Copyright 2012-201
3
Christoph Groth (CEA) and others. All rights reserved.
Copyright 2012-201
5
Christoph Groth (CEA) and others. All rights reserved.
(CEA = Commissariat à l'énergie atomique et aux énergies alternatives)
...
...
MANIFEST.in
View file @
43490fe3
...
...
@@ -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
...
...
README
→
README
.rst
View file @
43490fe3
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 http
s://gitlab.kwant-project.org/kwant/tinyarray.git
Installation
...
...
@@ -37,11 +43,11 @@ Installation
You can build from source with the usual ::
p
ython setup.py install
p
ip install tinyarray
Another possibility is to
use ::
You can also download the source tarball (or clone it from git) and
use ::
p
ip install tinyarray
p
ython setup.py install
Prepared packages exist for
...
...
README_WINDOWS.txt
View file @
43490fe3
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.)
TODO
deleted
100644 → 0
View file @
55a93184
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.
setup.py
View file @
43490fe3
...
...
@@ -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
=
"http
s://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"
],
...
...
src/arithmetic.cc
View file @
43490fe3
// 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>
...
...
src/arithmetic.hh
View file @
43490fe3
// 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
...
...
src/array.cc
View file @
43490fe3
// 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>
...
...
src/array.hh
View file @
43490fe3
// 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
...
...
src/conversion.hh
View file @
43490fe3
// 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
...
...
src/functions.cc
View file @
43490fe3
// 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"
...
...
src/functions.hh
View file @
43490fe3
// 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
...
...
test_tinyarray.py
View file @
43490fe3
# 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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment