A sparse matrix package based on Eigen.
Project description
SpPy is a sparse matrix library based on the C++ library Eigen with a similar interface to NumPy. Here is a code snippet:
::
>>> import numpy
>>> from sppy import csarray
>>> #Create a new column major dynamic array of float type
>>> B = csarray((5, 5), storagetype="col")
>>> B[3, 3] = -0.2
>>> B[0, 4] = -1.23
>>> B[numpy.array([0, 1]), numpy.array([0,1])] = 27
>>> print(B)
csarray dtype:float64 shape:(5, 5) non-zeros:4 storage:col
(0, 0) 27.0
(1, 1) 27.0
(3, 3) -0.2
(0, 4) -1.23
>>> print(B.sum())
52.57
More Information
----------------
* See the user guide at http://pythonhosted.org/sppy/
* The source code is available at https://github.com/charanpald/sppy
::
>>> import numpy
>>> from sppy import csarray
>>> #Create a new column major dynamic array of float type
>>> B = csarray((5, 5), storagetype="col")
>>> B[3, 3] = -0.2
>>> B[0, 4] = -1.23
>>> B[numpy.array([0, 1]), numpy.array([0,1])] = 27
>>> print(B)
csarray dtype:float64 shape:(5, 5) non-zeros:4 storage:col
(0, 0) 27.0
(1, 1) 27.0
(3, 3) -0.2
(0, 4) -1.23
>>> print(B.sum())
52.57
More Information
----------------
* See the user guide at http://pythonhosted.org/sppy/
* The source code is available at https://github.com/charanpald/sppy
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
sppy-0.6.7.zip
(1.2 MB
view details)
sppy-0.6.7.tar.gz
(1.1 MB
view details)
File details
Details for the file sppy-0.6.7.zip
.
File metadata
- Download URL: sppy-0.6.7.zip
- Upload date:
- Size: 1.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4d586f6fd1069978a112f06d6b2b7d26507df610ecb44e1f101ef5919469a2ed |
|
MD5 | 3ce204dc5af8bbe0db41d1501583ddba |
|
BLAKE2b-256 | 33068b0531c720b84176c7676c0069bb770140dd7cadc90f077f31f6ba193034 |
File details
Details for the file sppy-0.6.7.tar.gz
.
File metadata
- Download URL: sppy-0.6.7.tar.gz
- Upload date:
- Size: 1.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f8e2d1441d48b99419235c2fbf47ce0cf3c07c53a6d823f5658a00aa23a88e12 |
|
MD5 | 9b3c3fe64de1fe4ac62e3592c4850143 |
|
BLAKE2b-256 | 3f2d087cb11830cb806834e6cee220758fb8ed5bce7ab0a969f6c5bfcb32cd74 |