Package for creation of sparse matrices (SSparseMatrix objects.)
Project description
Random Sparse Matrix Generator in Python
In brief
This Python package implements the function random_sparse_matrix
that generates random sparse matrices.
Installation
To install from GitHub use the shell command:
python -m pip install git+https://github.com/antononcube/Python-packages.git#egg=RandomSparseMatrix\&subdirectory=RandomSparseMatrix
To install from PyPI:
python -m pip install RandomSparseMatrix
Examples
Here is random sparse matrix
(SSparseMatrix
object)
with 6 rows and 4 columns:
import random
from RandomSparseMatrix import *
random.seed(87)
rmat = random_sparse_matrix(6, 4,
column_names_generator=random_pet_name,
row_names_generator=random_word,
min_number_of_values=6,
max_number_of_values=None)
rmat.print_matrix(n_digits=20)
# ============================================================================================
# | Cleo Diamond Max Tessa
# --------------------------------------------------------------------------------------------
# cuticular | . . . 12.886794438387263
# elysian | . . . 13.891135469455826
# spot-check | . 11.465064963144142 . .
# cetacean | . 9.626463367706222 . .
# idem | 5.474873249244756 . . .
# lot | . . 10.818678723268317 .
# ============================================================================================
References
[AAp1] Anton Antonov, SSparseMatrix Python package, (2021), PyPI.
[AAp2] Anton Antonov, RandomDataGenerators Python package, (2021), PyPI.
[AAp3] Anton Antonov, SparseMatrixRecommender Python package, (2021), PyPI.
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
Close
Hashes for RandomSparseMatrix-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f605046db00fae3a0c64b6f8dd7a9fcf912f148480d785f76e80f51b0b429e7b |
|
MD5 | 801bea5cfc7c9fe2436a8bd40df2866a |
|
BLAKE2b-256 | 0475da35f874ce381ac92e40ae8bb883a98e23697bc1632a807bc70560afd827 |