Get SuiteSparse matrices into Python
Project description
suitesparseget
suitesparseget makes it easy to get matrices from the SuiteSparse Matrix Collection into Python. It provides a simple interface to download and access matrices from the collection, which is a widely used resource for testing and benchmarking numerical algorithms.
It is a modern version of ssgetpy, which allows downloading of matrix files, but does not provide a method to import them into Python.
suitesparseget uses the pandas library to manage the index of matrices, which allows easier manipulation and filtering of the data than ssgetpy.
An example in examples/ssget_example.py utilizes my
C++Sparse library to make spy plots of
the matrices.
The repo is a work in progress, so check back soon for more features and examples!
Usage
import suitesparseget as ssg
df = ssg.get_index() # get the index of matrices
print(df.head()) # print the first few rows of the index
# Get a problem from the index
problem = ssg.get_problem(index=df, name='arc130')
print(problem)
Configuration
You can configure the download directory for matrices by creating
a suitesparseget.toml file. On import, suitesparseget will look for this
file in:
- the current working directory
- the user's home directory
- the default data directory (
~/.suitesparseget). The first file found will be used. If no configuration file is found, data will be downloaded to the default data directory (~/.suitesparseget).
The configuration file can contain the following sections:
[paths]
data_directory = '.suitesparseget'
The path can either be absolute, or relative to the user's home directory.
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 Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file suitesparsegetpy-0.1.1.tar.gz.
File metadata
- Download URL: suitesparsegetpy-0.1.1.tar.gz
- Upload date:
- Size: 12.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1a9d5efc3ba3d483ec30a453157e222a4c203646c25414660e1992f642840c61
|
|
| MD5 |
8c602964a2f84da91a1f479d62cee82e
|
|
| BLAKE2b-256 |
d2535f9567c406385014a2d9924f1895b417c2d19b2073ca48745d219b07b668
|
File details
Details for the file suitesparsegetpy-0.1.1-py3-none-any.whl.
File metadata
- Download URL: suitesparsegetpy-0.1.1-py3-none-any.whl
- Upload date:
- Size: 11.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
55f627acfb0f68540b4858d1fe8fc109925c0f7bae6f2296eeb3428d2cfbc200
|
|
| MD5 |
7e3a40c8b1b30d7df8a1b3a850db5243
|
|
| BLAKE2b-256 |
10cb81139f70b3550543eaed32b3669992b7b30b194700c0bd82c598a2148be0
|