pax_global_header 0000666 0000000 0000000 00000000064 14634755015 0014524 g ustar 00root root 0000000 0000000 52 comment=de312ea3abf91ca31a914fa60706d5e3450dd176
sparse-0.16.0a9/ 0000775 0000000 0000000 00000000000 14634755015 0013337 5 ustar 00root root 0000000 0000000 sparse-0.16.0a9/.codecov.yml 0000664 0000000 0000000 00000000474 14634755015 0015567 0 ustar 00root root 0000000 0000000 comment: false
coverage:
status:
project:
default:
# Total project must be 95%
target: '100%'
threshold: '5%'
patch:
default:
# Patch coverage must be 92%
target: '100%'
threshold: '8%'
precision: 2
round: down
range: 80...98
sparse-0.16.0a9/.coveragerc 0000664 0000000 0000000 00000000323 14634755015 0015456 0 ustar 00root root 0000000 0000000 [run]
source=
sparse/
omit=
sparse/_version.py
sparse/tests/*
sparse/numba_backend/tests/*
[report]
exclude_lines =
pragma: no cover
return NotImplemented
raise NotImplementedError
sparse-0.16.0a9/.gitattributes 0000664 0000000 0000000 00000000040 14634755015 0016224 0 ustar 00root root 0000000 0000000 sparse/_version.py export-subst
sparse-0.16.0a9/.github/ 0000775 0000000 0000000 00000000000 14634755015 0014677 5 ustar 00root root 0000000 0000000 sparse-0.16.0a9/.github/CODE_OF_CONDUCT.md 0000664 0000000 0000000 00000000104 14634755015 0017471 0 ustar 00root root 0000000 0000000 # Code of Conduct
Please see [`docs/conduct.md`](docs/conduct.rst)
sparse-0.16.0a9/.github/FUNDING.yml 0000664 0000000 0000000 00000001225 14634755015 0016514 0 ustar 00root root 0000000 0000000 # These are supported funding model platforms
github: [Quansight, Quansight-Labs]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
sparse-0.16.0a9/.github/ISSUE_TEMPLATE/ 0000775 0000000 0000000 00000000000 14634755015 0017062 5 ustar 00root root 0000000 0000000 sparse-0.16.0a9/.github/ISSUE_TEMPLATE/bug_report.md 0000664 0000000 0000000 00000001056 14634755015 0021556 0 ustar 00root root 0000000 0000000 ---
name: Bug report
about: Create a report to help us improve
title: ''
labels: type:bug
assignees: ''
---
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior.
**Expected behavior**
A clear and concise description of what you expected to happen.
**System**
- OS and version: [e.g. Windows 10]
- `sparse` version (`sparse.__version__`)
- NumPy version (`np.__version__`)
- Numba version (`numba.__version__`)
**Additional context**
Add any other context about the problem here.
sparse-0.16.0a9/.github/ISSUE_TEMPLATE/feature_request.md 0000664 0000000 0000000 00000001074 14634755015 0022611 0 ustar 00root root 0000000 0000000 ---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: type:enhancement
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is.
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.
sparse-0.16.0a9/.github/ISSUE_TEMPLATE/question-support.md 0000664 0000000 0000000 00000000501 14634755015 0022761 0 ustar 00root root 0000000 0000000 ---
name: Question/Support
about: A question about how to use this library.
title: ''
labels: type:support
assignees: ''
---
**Description**
Provide a description of what you'd like to do.
**Example Code**
Syntactically valid Python code that shows what you want to do, possibly with placeholder functions or methods.
sparse-0.16.0a9/.github/workflows/ 0000775 0000000 0000000 00000000000 14634755015 0016734 5 ustar 00root root 0000000 0000000 sparse-0.16.0a9/.github/workflows/ci.yml 0000664 0000000 0000000 00000011203 14634755015 0020047 0 ustar 00root root 0000000 0000000 defaults:
run:
shell: bash -leo pipefail {0}
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
test:
strategy:
matrix:
os: [ubuntu-latest]
python: ['3.10', '3.11', '3.12']
pip_opts: ['']
numba_boundscheck: [0]
include:
- os: macos-latest
python: '3.10'
- os: windows-latest
python: '3.10'
- os: ubuntu-latest
python: '3.10'
numba_boundscheck: 1
- os: ubuntu-latest
python: '3.10'
pip_opts: 'numpy<2'
fail-fast: false
runs-on: ${{ matrix.os }}
env:
PYTHON_VERSION: ${{ matrix.python }}
NUMBA_BOUNDSCHECK: ${{ matrix.numba_boundscheck }}
PYTHONFAULTHANDLER: '${{ github.workspace }}/faulthandler.log'
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
cache: 'pip'
- name: Install package
run: |
pip install -e .[tests]
if [ "${{ matrix.pip_opts }}" != "" ]; then
pip install "${{ matrix.pip_opts }}" numba
fi
- name: Run tests
run: |
SPARSE_BACKEND=Numba pytest --pyargs sparse --cov-report=xml:coverage_Numba.xml -n 4 -vvv
SPARSE_BACKEND=Finch pytest --pyargs sparse/tests --cov-report=xml:coverage_Finch.xml -n 4 -vvv
- uses: codecov/codecov-action@v4
if: always()
with:
files: ./**/coverage*.xml
docs:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'pip'
- name: Install package
run: |
pip install -e .[docs]
- name: Run tests
run: |
sphinx-build -W -b html docs/ _build/html
- uses: actions/upload-artifact@v4
with:
name: Documentation
path: _build/html
benchmarks:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'pip'
- name: Install asv
run: |
pip install asv
asv machine --yes
- name: Run benchmarks
run: |
asv run --quick
examples:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pip'
- name: Build and install Sparse
run: |
pip install -U setuptools wheel
python -m pip install '.[finch]' scipy
- name: Run examples
run: |
source ci/test_examples.sh
array_api_tests:
strategy:
matrix:
backend: ['Numba', 'Finch']
fail-fast: false
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
- name: Checkout array-api-tests
uses: actions/checkout@v4
with:
repository: data-apis/array-api-tests
ref: '33f2d2ea2f3dd2b3ceeeb4519d55e08096184149' # Latest commit as of 2024-05-29
submodules: 'true'
path: 'array-api-tests'
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pip'
- name: Install build and test dependencies from PyPI
run: |
python -m pip install pytest-xdist -r array-api-tests/requirements.txt
- name: Build and install Sparse
run: |
python -m pip install '.[finch]'
- name: Run the test suite
env:
ARRAY_API_TESTS_MODULE: sparse
SPARSE_BACKEND: ${{ matrix.backend }}
run: |
cd ${GITHUB_WORKSPACE}/array-api-tests
pytest array_api_tests -v -c pytest.ini -n 4 --max-examples=2 --derandomize --disable-deadline -o xfail_strict=True --xfails-file ${GITHUB_WORKSPACE}/ci/${{ matrix.backend }}-array-api-xfails.txt --skips-file ${GITHUB_WORKSPACE}/ci/${{ matrix.backend }}-array-api-skips.txt
on:
# Trigger the workflow on push or pull request,
# but only for the main branch
push:
branches:
- main
- vnext
pull_request:
branches:
- main
- vnext
# Also trigger on page_build, as well as release created events
page_build:
release:
types: # This configuration does not affect the page_build event above
- created
sparse-0.16.0a9/.gitignore 0000664 0000000 0000000 00000001713 14634755015 0015331 0 ustar 00root root 0000000 0000000 #####=== Python ===#####
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
*.egg-info/
.installed.cfg
*.egg
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*,cover
.pytest_cache/
test_results/
junit/
.hypothesis/
# Airspeed velocity
.asv/
# Translations
*.mo
*.pot
# Django stuff:
*.log
# Sphinx documentation
docs/_build/
_build/
# PyBuilder
target/
# IDE
.idea/
.vscode/
default.profraw
# Sandbox
sandbox.py
# macOS
**/.DS_Store
# Version file
sparse/_version.py
# Benchmark Results
results/
sparse-0.16.0a9/.pre-commit-config.yaml 0000664 0000000 0000000 00000001274 14634755015 0017624 0 ustar 00root root 0000000 0000000 repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- id: fix-byte-order-marker
- id: destroyed-symlinks
- id: fix-encoding-pragma
args: ["--remove"]
- id: mixed-line-ending
- id: name-tests-test
args: ["--pytest-test-first"]
- id: no-commit-to-branch
- id: pretty-format-json
args: ["--autofix", "--no-ensure-ascii"]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.4.9
hooks:
- id: ruff
args: ["--fix"]
types_or: [ python, pyi, jupyter ]
- id: ruff-format
types_or: [ python, pyi, jupyter ]
sparse-0.16.0a9/.readthedocs.yml 0000664 0000000 0000000 00000000276 14634755015 0016432 0 ustar 00root root 0000000 0000000 version: 2
build:
os: ubuntu-22.04
tools:
python: "3.10"
sphinx:
configuration: docs/conf.py
python:
install:
- method: pip
path: .
extra_requirements:
- docs
sparse-0.16.0a9/LICENSE 0000664 0000000 0000000 00000002755 14634755015 0014355 0 ustar 00root root 0000000 0000000 BSD 3-Clause License
Copyright (c) 2018, Sparse developers
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
sparse-0.16.0a9/README.rst 0000664 0000000 0000000 00000001601 14634755015 0015024 0 ustar 00root root 0000000 0000000 Sparse Multidimensional Arrays
==============================
|Build Status| |Docs Status| |Coverage|
This library provides multi-dimensional sparse arrays.
* `Documentation `_
* `Contributing `_
* `Bug Reports/Feature Requests `_
.. |Build Status| image:: https://github.com/pydata/sparse/actions/workflows/ci.yml/badge.svg
:target: https://github.com/pydata/sparse/actions/workflows/ci.yml
:alt: Build status
.. |Docs Status| image:: https://readthedocs.org/projects/sparse-nd/badge/?version=latest
:target: http://sparse.pydata.org/en/latest/?badge=latest
:alt: Documentation Status
.. |Coverage| image:: https://codecov.io/gh/pydata/sparse/branch/main/graph/badge.svg
:target: https://codecov.io/gh/pydata/sparse
:alt: Coverage Report
sparse-0.16.0a9/asv.conf.json 0000664 0000000 0000000 00000001047 14634755015 0015751 0 ustar 00root root 0000000 0000000 {
"branches": [
"HEAD"
],
"build_command": [],
"environment_type": "virtualenv",
"install_command": [
"pip install --no-deps ."
],
"matrix": {
"env": {
"SPARSE_BACKEND": [
"Numba"
]
},
"env_nobuild": {},
"req": {
"numba": [
""
],
"numpy": [
""
]
}
},
"project": "sparse",
"project_url": "https://sparse.pydata.org/",
"pythons": [
"3.10"
],
"repo": ".",
"uninstall_command": [
"pip uninstall sparse --yes"
],
"version": 1
}
sparse-0.16.0a9/benchmarks/ 0000775 0000000 0000000 00000000000 14634755015 0015454 5 ustar 00root root 0000000 0000000 sparse-0.16.0a9/benchmarks/__init__.py 0000664 0000000 0000000 00000000000 14634755015 0017553 0 ustar 00root root 0000000 0000000 sparse-0.16.0a9/benchmarks/benchmark_coo.py 0000664 0000000 0000000 00000003431 14634755015 0020621 0 ustar 00root root 0000000 0000000 import sparse
import numpy as np
class MatrixMultiplySuite:
def setup(self):
rng = np.random.default_rng(0)
self.x = sparse.random((100, 100), density=0.01, random_state=rng)
self.y = sparse.random((100, 100), density=0.01, random_state=rng)
self.x @ self.y # Numba compilation
def time_matmul(self):
self.x @ self.y
class ElemwiseSuite:
def setup(self):
rng = np.random.default_rng(0)
self.x = sparse.random((100, 100, 100), density=0.01, random_state=rng)
self.y = sparse.random((100, 100, 100), density=0.01, random_state=rng)
self.x + self.y # Numba compilation
self.x * self.y # Numba compilation
def time_add(self):
self.x + self.y
def time_mul(self):
self.x * self.y
class ElemwiseBroadcastingSuite:
def setup(self):
rng = np.random.default_rng(0)
self.x = sparse.random((100, 1, 100), density=0.01, random_state=rng)
self.y = sparse.random((100, 100), density=0.01, random_state=rng)
self.x + self.y # Numba compilation
self.x * self.y # Numba compilation
def time_add(self):
self.x + self.y
def time_mul(self):
self.x * self.y
class IndexingSuite:
def setup(self):
rng = np.random.default_rng(0)
self.index = rng.integers(0, 100, 50)
self.x = sparse.random((100, 100, 100), density=0.01, random_state=rng)
# Numba compilation
self.x[5]
self.x[self.index]
def time_index_scalar(self):
self.x[5, 5, 5]
def time_index_slice(self):
self.x[:50]
def time_index_slice2(self):
self.x[:50, :50]
def time_index_slice3(self):
self.x[:50, :50, :50]
def time_index_fancy(self):
self.x[self.index]
sparse-0.16.0a9/benchmarks/benchmark_gcxs.py 0000664 0000000 0000000 00000004647 14634755015 0021017 0 ustar 00root root 0000000 0000000 import sparse
import numpy as np
class MatrixMultiplySuite:
def setup(self):
rng = np.random.default_rng(0)
self.x = sparse.random((100, 100), density=0.01, format="gcxs", random_state=rng)
self.y = sparse.random((100, 100), density=0.01, format="gcxs", random_state=rng)
self.x @ self.y # Numba compilation
def time_matmul(self):
self.x @ self.y
class ElemwiseSuite:
def setup(self):
rng = np.random.default_rng(0)
self.x = sparse.random((100, 100, 100), density=0.01, format="gcxs", random_state=rng)
self.y = sparse.random((100, 100, 100), density=0.01, format="gcxs", random_state=rng)
self.x + self.y # Numba compilation
def time_add(self):
self.x + self.y
def time_mul(self):
self.x * self.y
class ElemwiseBroadcastingSuite:
def setup(self):
rng = np.random.default_rng(0)
self.x = sparse.random((100, 1, 100), density=0.01, format="gcxs", random_state=rng)
self.y = sparse.random((100, 100), density=0.01, format="gcxs", random_state=rng)
def time_add(self):
self.x + self.y
def time_mul(self):
self.x * self.y
class IndexingSuite:
def setup(self):
rng = np.random.default_rng(0)
self.index = rng.integers(0, 100, 50)
self.x = sparse.random((100, 100, 100), density=0.01, format="gcxs", random_state=rng)
# Numba compilation
self.x[5]
self.x[self.index]
def time_index_scalar(self):
self.x[5, 5, 5]
def time_index_slice(self):
self.x[:50]
def time_index_slice2(self):
self.x[:50, :50]
def time_index_slice3(self):
self.x[:50, :50, :50]
def time_index_fancy(self):
self.x[self.index]
class DenseMultiplySuite:
params = ([0, 1], [1, 20, 100])
param_names = ["compressed axis", "n_vectors"]
def setup(self, compressed_axis, n_vecs):
rng = np.random.default_rng(1337)
n = 10000
x = sparse.random((n, n), density=0.001, format="gcxs", random_state=rng).change_compressed_axes(
(compressed_axis,)
)
self.x = x
self.t = rng.random((n, n_vecs))
self.u = rng.random((n_vecs, n))
# Numba compilation
self.x @ self.t
self.u @ self.x
def time_gcxs_dot_ndarray(self, *args):
self.x @ self.t
def time_ndarray_dot_gcxs(self, *args):
self.u @ self.x
sparse-0.16.0a9/benchmarks/benchmark_matmul.py 0000664 0000000 0000000 00000001067 14634755015 0021343 0 ustar 00root root 0000000 0000000 import sparse
import numpy as np
class Matmul_Sparse:
params = (["coo", "gcxs"], [0, 1, None])
def setup(self, p, dens_arg):
rng = np.random.default_rng(0)
self.x = sparse.random((100, 100), density=0.01, format=p, random_state=rng)
self.y = sparse.random((100, 100), density=0.01, format=p, random_state=rng)
if dens_arg == 0:
self.x = self.x.todense()
elif dens_arg == 1:
self.y = self.y.todense()
self.x @ self.y
def time_matmul(self, p, dens_arg):
self.x @ self.y
sparse-0.16.0a9/benchmarks/benchmark_tensordot.py 0000664 0000000 0000000 00000003256 14634755015 0022067 0 ustar 00root root 0000000 0000000 import sparse
import numpy as np
class TensordotSuiteDenseSparse:
"""
Performance comparison for returntype=COO vs returntype=np.ndarray.
tensordot(np.ndarray, COO)
"""
def setup(self):
rng = np.random.default_rng(0)
self.n = rng.random((100, 100))
self.s = sparse.random((100, 100, 100, 100), density=0.01, random_state=rng)
def time_dense(self):
sparse.tensordot(self.n, self.s, axes=([0, 1], [0, 2]))
def time_sparse(self):
sparse.tensordot(self.n, self.s, axes=([0, 1], [0, 2]), return_type=sparse.COO)
class TensordotSuiteSparseSparse:
"""
Performance comparison for returntype=COO vs returntype=np.ndarray.
tensordot(COO, COO)
"""
def setup(self):
rng = np.random.default_rng(0)
self.s1 = sparse.random((100, 100), density=0.01, random_state=rng)
self.s2 = sparse.random((100, 100, 100, 100), density=0.01, random_state=rng)
def time_dense(self):
sparse.tensordot(self.s1, self.s2, axes=([0, 1], [0, 2]), return_type=np.ndarray)
def time_sparse(self):
sparse.tensordot(self.s1, self.s2, axes=([0, 1], [0, 2]))
class TensordotSuiteSparseDense:
"""
Performance comparison for returntype=COO vs returntype=np.ndarray.
tensordot(COO, np.ndarray)
"""
def setup(self):
rng = np.random.default_rng(0)
self.s = sparse.random((100, 100, 100, 100), density=0.01, random_state=rng)
self.n = rng.random((100, 100))
def time_dense(self):
sparse.tensordot(self.s, self.n, axes=([0, 1], [0, 1]))
def time_sparse(self):
sparse.tensordot(self.s, self.n, axes=([0, 1], [0, 1]), return_type=sparse.COO)
sparse-0.16.0a9/ci/ 0000775 0000000 0000000 00000000000 14634755015 0013732 5 ustar 00root root 0000000 0000000 sparse-0.16.0a9/ci/Finch-array-api-skips.txt 0000664 0000000 0000000 00000000474 14634755015 0020541 0 ustar 00root root 0000000 0000000 # `test_nonzero` name conflict
array_api_tests/test_searching_functions.py::test_nonzero_zerodim_error
# flaky test
array_api_tests/test_special_cases.py::test_unary[sign((x_i is -0 or x_i == +0)) -> 0]
# `broadcast_to` is not defined in Finch, hangs as xfail
array_api_tests/test_searching_functions.py::test_where
sparse-0.16.0a9/ci/Finch-array-api-xfails.txt 0000664 0000000 0000000 00000040701 14634755015 0020673 0 ustar 00root root 0000000 0000000 # test_signatures
# not implemented
# stats functions
array_api_tests/test_signatures.py::test_func_signature[mean]
array_api_tests/test_signatures.py::test_func_signature[std]
array_api_tests/test_signatures.py::test_func_signature[var]
# set functions
array_api_tests/test_signatures.py::test_func_signature[unique_all]
array_api_tests/test_signatures.py::test_func_signature[unique_counts]
array_api_tests/test_signatures.py::test_func_signature[unique_inverse]
array_api_tests/test_signatures.py::test_func_signature[unique_values]
# creation functions
array_api_tests/test_signatures.py::test_func_signature[meshgrid]
array_api_tests/test_signatures.py::test_func_signature[tril]
array_api_tests/test_signatures.py::test_func_signature[triu]
# inspection functions
array_api_tests/test_signatures.py::test_func_signature[isdtype]
array_api_tests/test_signatures.py::test_func_signature[result_type]
# other functions
array_api_tests/test_signatures.py::test_func_signature[concat]
array_api_tests/test_signatures.py::test_func_signature[argsort]
array_api_tests/test_signatures.py::test_func_signature[sort]
array_api_tests/test_signatures.py::test_func_signature[broadcast_arrays]
array_api_tests/test_signatures.py::test_func_signature[broadcast_to]
array_api_tests/test_signatures.py::test_func_signature[expand_dims]
array_api_tests/test_signatures.py::test_func_signature[flip]
array_api_tests/test_signatures.py::test_func_signature[roll]
array_api_tests/test_signatures.py::test_func_signature[squeeze]
array_api_tests/test_signatures.py::test_func_signature[stack]
array_api_tests/test_signatures.py::test_func_signature[matrix_transpose]
array_api_tests/test_signatures.py::test_func_signature[vecdot]
array_api_tests/test_signatures.py::test_func_signature[take]
array_api_tests/test_signatures.py::test_func_signature[argmax]
array_api_tests/test_signatures.py::test_func_signature[argmin]
array_api_tests/test_signatures.py::test_func_signature[from_dlpack]
array_api_tests/test_signatures.py::test_func_signature[cumulative_sum]
array_api_tests/test_signatures.py::test_func_signature[searchsorted]
array_api_tests/test_signatures.py::test_func_signature[moveaxis]
array_api_tests/test_signatures.py::test_func_signature[repeat]
array_api_tests/test_signatures.py::test_func_signature[tile]
array_api_tests/test_signatures.py::test_func_signature[unstack]
array_api_tests/test_signatures.py::test_func_signature[clip]
array_api_tests/test_signatures.py::test_func_signature[copysign]
array_api_tests/test_signatures.py::test_func_signature[hypot]
array_api_tests/test_signatures.py::test_func_signature[logical_not]
array_api_tests/test_signatures.py::test_func_signature[maximum]
array_api_tests/test_signatures.py::test_func_signature[minimum]
array_api_tests/test_signatures.py::test_func_signature[signbit]
# linalg namespace
array_api_tests/test_signatures.py::test_extension_func_signature[linalg.cross]
array_api_tests/test_signatures.py::test_extension_func_signature[linalg.matmul]
array_api_tests/test_signatures.py::test_extension_func_signature[linalg.cholesky]
array_api_tests/test_signatures.py::test_extension_func_signature[linalg.matrix_norm]
array_api_tests/test_signatures.py::test_extension_func_signature[linalg.matrix_rank]
array_api_tests/test_signatures.py::test_extension_func_signature[linalg.matrix_transpose]
array_api_tests/test_signatures.py::test_extension_func_signature[linalg.outer]
array_api_tests/test_signatures.py::test_extension_func_signature[linalg.pinv]
array_api_tests/test_signatures.py::test_extension_func_signature[linalg.svdvals]
array_api_tests/test_signatures.py::test_extension_func_signature[linalg.tensordot]
array_api_tests/test_signatures.py::test_extension_func_signature[linalg.vecdot]
array_api_tests/test_signatures.py::test_extension_func_signature[linalg.vector_norm]
# Array object namespace
array_api_tests/test_signatures.py::test_array_method_signature[__dlpack__]
array_api_tests/test_signatures.py::test_array_method_signature[__dlpack_device__]
array_api_tests/test_signatures.py::test_array_method_signature[__setitem__]
# test_creation_functions
# not implemented
array_api_tests/test_creation_functions.py::test_meshgrid
# test_array_object
array_api_tests/test_array_object.py::test_getitem
array_api_tests/test_array_object.py::test_setitem
array_api_tests/test_array_object.py::test_getitem_masking
array_api_tests/test_array_object.py::test_setitem_masking
# test_operators_and_elementwise_functions
# throws for x < 1 instead of NaN
array_api_tests/test_operators_and_elementwise_functions.py::test_acosh
# not implemented
array_api_tests/test_operators_and_elementwise_functions.py::test_logical_not
# test_data_type_functions
# not implemented
array_api_tests/test_data_type_functions.py::test_broadcast_arrays
array_api_tests/test_data_type_functions.py::test_broadcast_to
array_api_tests/test_data_type_functions.py::test_isdtype
array_api_tests/test_data_type_functions.py::test_result_type
array_api_tests/test_data_type_functions.py::test_finfo[Float32]
# test_has_names
array_api_tests/test_has_names.py::test_has_names[linalg-cholesky]
array_api_tests/test_has_names.py::test_has_names[linalg-cross]
array_api_tests/test_has_names.py::test_has_names[linalg-det]
array_api_tests/test_has_names.py::test_has_names[linalg-diagonal]
array_api_tests/test_has_names.py::test_has_names[linalg-eigh]
array_api_tests/test_has_names.py::test_has_names[linalg-eigvalsh]
array_api_tests/test_has_names.py::test_has_names[linalg-inv]
array_api_tests/test_has_names.py::test_has_names[linalg-matmul]
array_api_tests/test_has_names.py::test_has_names[linalg-matrix_norm]
array_api_tests/test_has_names.py::test_has_names[linalg-matrix_power]
array_api_tests/test_has_names.py::test_has_names[linalg-matrix_rank]
array_api_tests/test_has_names.py::test_has_names[linalg-matrix_transpose]
array_api_tests/test_has_names.py::test_has_names[linalg-outer]
array_api_tests/test_has_names.py::test_has_names[linalg-pinv]
array_api_tests/test_has_names.py::test_has_names[linalg-qr]
array_api_tests/test_has_names.py::test_has_names[linalg-slogdet]
array_api_tests/test_has_names.py::test_has_names[linalg-solve]
array_api_tests/test_has_names.py::test_has_names[linalg-svd]
array_api_tests/test_has_names.py::test_has_names[linalg-svdvals]
array_api_tests/test_has_names.py::test_has_names[linalg-tensordot]
array_api_tests/test_has_names.py::test_has_names[linalg-trace]
array_api_tests/test_has_names.py::test_has_names[linalg-vecdot]
array_api_tests/test_has_names.py::test_has_names[linalg-vector_norm]
array_api_tests/test_has_names.py::test_has_names[statistical-cumulative_sum]
array_api_tests/test_has_names.py::test_has_names[statistical-mean]
array_api_tests/test_has_names.py::test_has_names[statistical-std]
array_api_tests/test_has_names.py::test_has_names[statistical-var]
array_api_tests/test_has_names.py::test_has_names[set-unique_all]
array_api_tests/test_has_names.py::test_has_names[set-unique_counts]
array_api_tests/test_has_names.py::test_has_names[set-unique_inverse]
array_api_tests/test_has_names.py::test_has_names[set-unique_values]
array_api_tests/test_has_names.py::test_has_names[searching-argmax]
array_api_tests/test_has_names.py::test_has_names[searching-argmin]
array_api_tests/test_has_names.py::test_has_names[searching-searchsorted]
array_api_tests/test_has_names.py::test_has_names[creation-from_dlpack]
array_api_tests/test_has_names.py::test_has_names[creation-meshgrid]
array_api_tests/test_has_names.py::test_has_names[creation-tril]
array_api_tests/test_has_names.py::test_has_names[creation-triu]
array_api_tests/test_has_names.py::test_has_names[manipulation-broadcast_arrays]
array_api_tests/test_has_names.py::test_has_names[manipulation-broadcast_to]
array_api_tests/test_has_names.py::test_has_names[manipulation-concat]
array_api_tests/test_has_names.py::test_has_names[manipulation-expand_dims]
array_api_tests/test_has_names.py::test_has_names[manipulation-flip]
array_api_tests/test_has_names.py::test_has_names[manipulation-moveaxis]
array_api_tests/test_has_names.py::test_has_names[manipulation-repeat]
array_api_tests/test_has_names.py::test_has_names[manipulation-roll]
array_api_tests/test_has_names.py::test_has_names[manipulation-squeeze]
array_api_tests/test_has_names.py::test_has_names[manipulation-stack]
array_api_tests/test_has_names.py::test_has_names[manipulation-tile]
array_api_tests/test_has_names.py::test_has_names[manipulation-unstack]
array_api_tests/test_has_names.py::test_has_names[sorting-argsort]
array_api_tests/test_has_names.py::test_has_names[sorting-sort]
array_api_tests/test_has_names.py::test_has_names[data_type-isdtype]
array_api_tests/test_has_names.py::test_has_names[data_type-result_type]
array_api_tests/test_has_names.py::test_has_names[elementwise-clip]
array_api_tests/test_has_names.py::test_has_names[elementwise-copysign]
array_api_tests/test_has_names.py::test_has_names[elementwise-hypot]
array_api_tests/test_has_names.py::test_has_names[elementwise-logical_not]
array_api_tests/test_has_names.py::test_has_names[elementwise-maximum]
array_api_tests/test_has_names.py::test_has_names[elementwise-minimum]
array_api_tests/test_has_names.py::test_has_names[elementwise-signbit]
array_api_tests/test_has_names.py::test_has_names[linear_algebra-matrix_transpose]
array_api_tests/test_has_names.py::test_has_names[linear_algebra-vecdot]
array_api_tests/test_has_names.py::test_has_names[indexing-take]
array_api_tests/test_has_names.py::test_has_names[array_method-__dlpack__]
array_api_tests/test_has_names.py::test_has_names[array_method-__dlpack_device__]
array_api_tests/test_has_names.py::test_has_names[array_method-__setitem__]
array_api_tests/test_has_names.py::test_has_names[array_attribute-T]
array_api_tests/test_has_names.py::test_has_names[array_attribute-mT]
# test_indexing_functions
# not implemented
array_api_tests/test_indexing_functions.py::test_take
# test_linalg
# not implemented
array_api_tests/test_linalg.py::test_matrix_transpose
array_api_tests/test_linalg.py::test_vecdot
# test suite draws two scalars
array_api_tests/test_linalg.py::test_tensordot
# test_manipulation_functions
# not implemented
array_api_tests/test_manipulation_functions.py::test_concat
array_api_tests/test_manipulation_functions.py::test_expand_dims
array_api_tests/test_manipulation_functions.py::test_squeeze
array_api_tests/test_manipulation_functions.py::test_flip
array_api_tests/test_manipulation_functions.py::test_roll
array_api_tests/test_manipulation_functions.py::test_stack
# test_searching_functions
# not implemented
array_api_tests/test_searching_functions.py::test_argmax
array_api_tests/test_searching_functions.py::test_argmin
# 0D issue
array_api_tests/test_searching_functions.py::test_nonzero
# test_set_functions
# not implemented
array_api_tests/test_set_functions.py::test_unique_all
array_api_tests/test_set_functions.py::test_unique_counts
array_api_tests/test_set_functions.py::test_unique_inverse
array_api_tests/test_set_functions.py::test_unique_values
# test_sorting_functions
# not implemented
array_api_tests/test_sorting_functions.py::test_argsort
array_api_tests/test_sorting_functions.py::test_sort
# test_special_cases
array_api_tests/test_special_cases.py::test_unary[acos(x_i > 1) -> NaN]
array_api_tests/test_special_cases.py::test_unary[acos(x_i < -1) -> NaN]
array_api_tests/test_special_cases.py::test_unary[acosh(x_i is NaN) -> NaN]
array_api_tests/test_special_cases.py::test_unary[acosh(x_i < 1) -> NaN]
array_api_tests/test_special_cases.py::test_unary[acosh(x_i is 1) -> +0]
array_api_tests/test_special_cases.py::test_unary[acosh(x_i is +infinity) -> +infinity]
array_api_tests/test_special_cases.py::test_unary[asin(x_i > 1) -> NaN]
array_api_tests/test_special_cases.py::test_unary[asin(x_i < -1) -> NaN]
array_api_tests/test_special_cases.py::test_unary[atanh(x_i < -1) -> NaN]
array_api_tests/test_special_cases.py::test_unary[atanh(x_i > 1) -> NaN]
array_api_tests/test_special_cases.py::test_unary[cos(x_i is +infinity) -> NaN]
array_api_tests/test_special_cases.py::test_unary[cos(x_i is -infinity) -> NaN]
array_api_tests/test_special_cases.py::test_unary[log(x_i < 0) -> NaN]
array_api_tests/test_special_cases.py::test_unary[log1p(x_i < -1) -> NaN]
array_api_tests/test_special_cases.py::test_unary[log2(x_i < 0) -> NaN]
array_api_tests/test_special_cases.py::test_unary[log10(x_i < 0) -> NaN]
array_api_tests/test_special_cases.py::test_unary[signbit(x_i is +0) -> False]
array_api_tests/test_special_cases.py::test_unary[signbit(x_i is -0) -> True]
array_api_tests/test_special_cases.py::test_unary[signbit(x_i is +infinity) -> False]
array_api_tests/test_special_cases.py::test_unary[signbit(x_i is -infinity) -> True]
array_api_tests/test_special_cases.py::test_unary[signbit(isfinite(x_i) and x_i > 0) -> False]
array_api_tests/test_special_cases.py::test_unary[signbit(isfinite(x_i) and x_i < 0) -> True]
array_api_tests/test_special_cases.py::test_unary[signbit(x_i is NaN) -> False]
array_api_tests/test_special_cases.py::test_unary[signbit(x_i is NaN) -> True]
array_api_tests/test_special_cases.py::test_unary[sin((x_i is +infinity or x_i == -infinity)) -> NaN]
array_api_tests/test_special_cases.py::test_unary[sqrt(x_i < 0) -> NaN]
array_api_tests/test_special_cases.py::test_unary[tan((x_i is +infinity or x_i == -infinity)) -> NaN]
array_api_tests/test_special_cases.py::test_binary[copysign(x2_i < 0) -> NaN]
array_api_tests/test_special_cases.py::test_binary[copysign(x2_i is -0) -> NaN]
array_api_tests/test_special_cases.py::test_binary[copysign(x2_i is +0) -> NaN]
array_api_tests/test_special_cases.py::test_binary[copysign(x2_i > 0) -> NaN]
array_api_tests/test_special_cases.py::test_binary[maximum(x1_i is NaN or x2_i is NaN) -> NaN]
array_api_tests/test_special_cases.py::test_binary[minimum(x1_i is NaN or x2_i is NaN) -> NaN]
array_api_tests/test_special_cases.py::test_binary[pow(x1_i is -infinity and x2_i > 0 and not (x2_i.is_integer() and x2_i % 2 == 1)) -> +infinity]
array_api_tests/test_special_cases.py::test_binary[pow(x1_i is -infinity and x2_i < 0 and x2_i.is_integer() and x2_i % 2 == 1) -> -0]
array_api_tests/test_special_cases.py::test_binary[pow(x1_i is -infinity and x2_i < 0 and not (x2_i.is_integer() and x2_i % 2 == 1)) -> +0]
array_api_tests/test_special_cases.py::test_binary[pow(x1_i is -0 and x2_i > 0 and x2_i.is_integer() and x2_i % 2 == 1) -> -0]
array_api_tests/test_special_cases.py::test_binary[pow(x1_i < 0 and isfinite(x1_i) and isfinite(x2_i) and not x2_i.is_integer()) -> NaN]
array_api_tests/test_special_cases.py::test_binary[__pow__(x1_i is -infinity and x2_i > 0 and not (x2_i.is_integer() and x2_i % 2 == 1)) -> +infinity]
array_api_tests/test_special_cases.py::test_binary[__pow__(x1_i is -infinity and x2_i < 0 and x2_i.is_integer() and x2_i % 2 == 1) -> -0]
array_api_tests/test_special_cases.py::test_binary[__pow__(x1_i is -infinity and x2_i < 0 and not (x2_i.is_integer() and x2_i % 2 == 1)) -> +0]
array_api_tests/test_special_cases.py::test_binary[__pow__(x1_i is -0 and x2_i > 0 and x2_i.is_integer() and x2_i % 2 == 1) -> -0]
array_api_tests/test_special_cases.py::test_binary[__pow__(x1_i < 0 and isfinite(x1_i) and isfinite(x2_i) and not x2_i.is_integer()) -> NaN]
array_api_tests/test_special_cases.py::test_iop[__ipow__(x1_i is -infinity and x2_i > 0 and not (x2_i.is_integer() and x2_i % 2 == 1)) -> +infinity]
array_api_tests/test_special_cases.py::test_iop[__ipow__(x1_i is -infinity and x2_i < 0 and x2_i.is_integer() and x2_i % 2 == 1) -> -0]
array_api_tests/test_special_cases.py::test_iop[__ipow__(x1_i is -infinity and x2_i < 0 and not (x2_i.is_integer() and x2_i % 2 == 1)) -> +0]
array_api_tests/test_special_cases.py::test_iop[__ipow__(x1_i is -0 and x2_i > 0 and x2_i.is_integer() and x2_i % 2 == 1) -> -0]
array_api_tests/test_special_cases.py::test_iop[__ipow__(x1_i < 0 and isfinite(x1_i) and isfinite(x2_i) and not x2_i.is_integer()) -> NaN]
array_api_tests/test_special_cases.py::test_empty_arrays[mean]
array_api_tests/test_special_cases.py::test_empty_arrays[std]
array_api_tests/test_special_cases.py::test_empty_arrays[var]
array_api_tests/test_special_cases.py::test_nan_propagation[cumulative_sum]
array_api_tests/test_special_cases.py::test_nan_propagation[max]
array_api_tests/test_special_cases.py::test_nan_propagation[mean]
array_api_tests/test_special_cases.py::test_nan_propagation[min]
array_api_tests/test_special_cases.py::test_nan_propagation[prod]
array_api_tests/test_special_cases.py::test_nan_propagation[std]
array_api_tests/test_special_cases.py::test_nan_propagation[sum]
array_api_tests/test_special_cases.py::test_nan_propagation[var]
# test_statistical_functions
# not implemented
array_api_tests/test_statistical_functions.py::test_mean
sparse-0.16.0a9/ci/Numba-array-api-skips.txt 0000664 0000000 0000000 00000000110 14634755015 0020537 0 ustar 00root root 0000000 0000000 array_api_tests/test_operators_and_elementwise_functions.py::test_floor
sparse-0.16.0a9/ci/Numba-array-api-xfails.txt 0000664 0000000 0000000 00000010546 14634755015 0020712 0 ustar 00root root 0000000 0000000 array_api_tests/test_array_object.py::test_setitem
array_api_tests/test_array_object.py::test_getitem_masking
array_api_tests/test_array_object.py::test_setitem_masking
array_api_tests/test_creation_functions.py::test_arange
array_api_tests/test_creation_functions.py::test_linspace
array_api_tests/test_creation_functions.py::test_meshgrid
array_api_tests/test_data_type_functions.py::test_finfo[float32]
array_api_tests/test_data_type_functions.py::test_isdtype
array_api_tests/test_has_names.py::test_has_names[linalg-cholesky]
array_api_tests/test_has_names.py::test_has_names[linalg-cross]
array_api_tests/test_has_names.py::test_has_names[linalg-det]
array_api_tests/test_has_names.py::test_has_names[linalg-diagonal]
array_api_tests/test_has_names.py::test_has_names[linalg-eigh]
array_api_tests/test_has_names.py::test_has_names[linalg-eigvalsh]
array_api_tests/test_has_names.py::test_has_names[linalg-inv]
array_api_tests/test_has_names.py::test_has_names[linalg-matmul]
array_api_tests/test_has_names.py::test_has_names[linalg-matrix_norm]
array_api_tests/test_has_names.py::test_has_names[linalg-matrix_power]
array_api_tests/test_has_names.py::test_has_names[linalg-matrix_rank]
array_api_tests/test_has_names.py::test_has_names[linalg-matrix_transpose]
array_api_tests/test_has_names.py::test_has_names[linalg-outer]
array_api_tests/test_has_names.py::test_has_names[linalg-pinv]
array_api_tests/test_has_names.py::test_has_names[linalg-qr]
array_api_tests/test_has_names.py::test_has_names[linalg-slogdet]
array_api_tests/test_has_names.py::test_has_names[linalg-solve]
array_api_tests/test_has_names.py::test_has_names[linalg-svd]
array_api_tests/test_has_names.py::test_has_names[linalg-svdvals]
array_api_tests/test_has_names.py::test_has_names[linalg-tensordot]
array_api_tests/test_has_names.py::test_has_names[linalg-trace]
array_api_tests/test_has_names.py::test_has_names[linalg-vecdot]
array_api_tests/test_has_names.py::test_has_names[linalg-vector_norm]
array_api_tests/test_has_names.py::test_has_names[set-unique_all]
array_api_tests/test_has_names.py::test_has_names[set-unique_inverse]
array_api_tests/test_has_names.py::test_has_names[creation-arange]
array_api_tests/test_has_names.py::test_has_names[creation-from_dlpack]
array_api_tests/test_has_names.py::test_has_names[creation-linspace]
array_api_tests/test_has_names.py::test_has_names[creation-meshgrid]
array_api_tests/test_has_names.py::test_has_names[sorting-argsort]
array_api_tests/test_has_names.py::test_has_names[data_type-isdtype]
array_api_tests/test_has_names.py::test_has_names[array_method-__dlpack__]
array_api_tests/test_has_names.py::test_has_names[array_method-__dlpack_device__]
array_api_tests/test_has_names.py::test_has_names[array_method-__setitem__]
array_api_tests/test_indexing_functions.py::test_take
array_api_tests/test_linalg.py::test_vecdot
array_api_tests/test_operators_and_elementwise_functions.py::test_ceil
array_api_tests/test_operators_and_elementwise_functions.py::test_trunc
array_api_tests/test_set_functions.py::test_unique_all
array_api_tests/test_set_functions.py::test_unique_inverse
array_api_tests/test_signatures.py::test_func_signature[unique_all]
array_api_tests/test_signatures.py::test_func_signature[unique_inverse]
array_api_tests/test_signatures.py::test_func_signature[arange]
array_api_tests/test_signatures.py::test_func_signature[from_dlpack]
array_api_tests/test_signatures.py::test_func_signature[linspace]
array_api_tests/test_signatures.py::test_func_signature[meshgrid]
array_api_tests/test_signatures.py::test_func_signature[argsort]
array_api_tests/test_signatures.py::test_func_signature[isdtype]
array_api_tests/test_signatures.py::test_array_method_signature[__dlpack__]
array_api_tests/test_signatures.py::test_array_method_signature[__dlpack_device__]
array_api_tests/test_signatures.py::test_array_method_signature[__setitem__]
array_api_tests/test_sorting_functions.py::test_argsort
array_api_tests/test_sorting_functions.py::test_sort
array_api_tests/test_special_cases.py::test_nan_propagation[max]
array_api_tests/test_special_cases.py::test_nan_propagation[mean]
array_api_tests/test_special_cases.py::test_nan_propagation[min]
array_api_tests/test_special_cases.py::test_nan_propagation[prod]
array_api_tests/test_special_cases.py::test_nan_propagation[std]
array_api_tests/test_special_cases.py::test_nan_propagation[sum]
array_api_tests/test_special_cases.py::test_nan_propagation[var]
sparse-0.16.0a9/ci/environment.yml 0000664 0000000 0000000 00000000114 14634755015 0017015 0 ustar 00root root 0000000 0000000 name: sparse-dev
channels:
- conda-forge
dependencies:
- python
- pip
sparse-0.16.0a9/ci/test_examples.sh 0000664 0000000 0000000 00000000112 14634755015 0017135 0 ustar 00root root 0000000 0000000 for example in $(find ./examples/ -iname *.py); do
python $example
done
sparse-0.16.0a9/docs/ 0000775 0000000 0000000 00000000000 14634755015 0014267 5 ustar 00root root 0000000 0000000 sparse-0.16.0a9/docs/_templates/ 0000775 0000000 0000000 00000000000 14634755015 0016424 5 ustar 00root root 0000000 0000000 sparse-0.16.0a9/docs/_templates/autosummary/ 0000775 0000000 0000000 00000000000 14634755015 0021012 5 ustar 00root root 0000000 0000000 sparse-0.16.0a9/docs/_templates/autosummary/base.rst 0000664 0000000 0000000 00000000151 14634755015 0022453 0 ustar 00root root 0000000 0000000 {{ objname | escape | underline}}
.. currentmodule:: {{ module }}
.. auto{{ objtype }}:: {{ objname }}
sparse-0.16.0a9/docs/_templates/autosummary/class.rst 0000664 0000000 0000000 00000001017 14634755015 0022650 0 ustar 00root root 0000000 0000000 {{ objname | escape | underline}}
.. currentmodule:: {{ module }}
.. autoclass:: {{ objname }}
{% block attributes %}
{% if attributes %}
.. rubric:: Attributes
.. autosummary::
:toctree:
{% for item in attributes %}
{{ name }}.{{ item }}
{% endfor %}
{% endif %}
{% endblock %}
{% block methods %}
{% if methods %}
.. rubric:: Methods
.. autosummary::
:toctree:
{% for item in methods %}
{{ name }}.{{ item }}
{% endfor %}
{% endif %}
{% endblock %}
sparse-0.16.0a9/docs/_templates/autosummary/module.rst 0000664 0000000 0000000 00000000654 14634755015 0023036 0 ustar 00root root 0000000 0000000 {{ fullname | escape | underline }}
.. rubric:: Description
.. automodule:: {{ fullname }}
.. currentmodule:: {{ fullname }}
{% if classes %}
.. rubric:: Classes
.. autosummary::
:toctree:
{% for class in classes %}
{{ class }}
{% endfor %}
{% endif %}
{% if functions %}
.. rubric:: Functions
.. autosummary::
:toctree:
{% for function in functions %}
{{ function }}
{% endfor %}
{% endif %}
sparse-0.16.0a9/docs/changelog.rst 0000664 0000000 0000000 00000035622 14634755015 0016760 0 ustar 00root root 0000000 0000000 Changelog
=========
.. currentmodule:: sparse
0.15.1 / 2024-01-10
-------------------
* Fix regression where with XArray by supporting all API functions via the Array API standard. (:pr:`622` thanks :ghuser:`hameerabbasi`)
0.15.0 / 2024-01-09
-------------------
* Fix regression where :obj:`DeprecationWarning`s were being fired unexpectedly. (:pr:`581` thanks :ghuser:`hameerabbasi`)
* Extended :obj:`sparse.einsum` support (:pr:`579` thanks :ghuser:`HadrienNU`)
* General code clean-up (:pr:`586` thanks :ghuser:`MHRasmy`, :pr:`598` thanks :ghuser:`jamestwebber`)
* Bug fixes with respect to NumPy compatibility (:pr:`598` thanks :ghuser:`hameerabbasi`, :pr:`609` thanks :ghuser:`Illviljan`, :pr:`620` thanks :ghuser:`mtsokol`)
* Bug fixes with respect to GCXS (:pr:`611` thanks :ghuser:`EuGig`, :pr:`601` thanks :ghuser:`jamestwebber`)
* `Array API standard `_ support (:pr:`612`, :pr:`613`, :pr:`614`, :pr:`615`, :pr:`619`, :pr:`620` thanks :ghuser:`mtsokol`)
* ``matrepr`` support for display of sparse data (:pr:`605`, :pr:`606` thanks :ghuser:`alugowski`).
* Larger code clean-up with Ruff formatter and linter (:pr:`617`, :pr:`621` thanks :ghuser:`hameerabbasi`)
* Packaging and maintenance (:pr:`616`, :commit:`b5954e68d3d6e35a62f7401d1d4fb84ea04414dd`, :commit:`dda93d3ea9521881c721c3ba875c769c9c5a79d4` thanks :ghuser:`hameerabbasi`)
0.14.0 / 2023-02-24
-------------------
* :obj:`sparse.einsum` support (:pr:`564` thanks
:ghuser:`jcmgray`)
* Some bug-fixes (:pr:`524`, :pr:`527`, :pr:`555` thanks :ghuser:`hameerabbasi`, :pr:`569`, thanks :ghuser:`jamestwebber`, :pr:`534`, thanks :ghuser:`sarveshbhatnagar`)
* Some performance improvements (:pr:`570`, thanks :ghuser:`jamestwebber`, :pr:`540`, thanks :ghuser:`smldub`).
* Miscellaneous maintenance fixes.
0.13.0 / 2021-08-28
-------------------
* GCXS improvements and changes. (:pr:`448`, :pr:`450`, :pr:`455`, thanks
:ghuser:`sayandip18`).
* Maintainence fixes (:pr:`462`, :pr:`466`, :commit:`1ccb85da581be65a0345b399e00fd3c325700d95`,
:commit:`5547b4e92dc8d61492e9dc10ba00175c1a6637fa`
:commit:`00c0e5514de2aab8b9a0be16b5da470b091d9eb9`, :commit:`fcd3020dd08c7022a44f709173fe23969d3e8f7c`,
thanks :ghuser:`hameerabbasi`)
* :obj:`sparse.DOK.from_scipy_sparse` method (:pr:`464`, :issue:`463`, thanks
:ghuser:`hameerabbasi`).
* Black re-formatting (:pr:`471`, :pr:`484`, thanks :ghuser:`GenevieveBuckley`, :ghuser:`sayandip18`)
* Add :obj:`sparse.pad` (:pr:`474`, :issue:`438`, thanks :ghuser:`H4R5H1T-007`)
* Switch to GitHub Actions (:compare:`5547b4e92dc8d61492e9dc10ba00175c1a6637fa..a332f22c96a96e5ab9b4384342df67e8f3966f85`)
* Fix a number of bugs in format conversion. (:pr:`504`, :issue:`503`, thanks
:ghuser:`hameerabbasi`)
* Fix bug in :obj:`sparse.matmul` for higher-dimensional arrays. (:pr:`508`,
:issue:`506`, thanks :ghuser:`sayandip18`).
* Fix scalar conversion to COO (:issue:`510`, :pr:`511`, thanks :ghuser:`hameerabbasi`)
* Fix OOB memory accesses (:issue:`515`, :commit:`1e24a7e29786e888dee4c02153309986ae4b5dde`
thanks :ghuser:`hameerabbasi`)
* Fixes element-wise ops with scalar COO array. (:issue:`505`, :commit:`5211441ec685233657ab7156f99eb67e660cee86`,
thanks :ghuser:`hameerabbasi`)
* Fix scalar broadcast_to with ``nnz==0``. (:issue:`513`, :commit:`bfabaa0805e811884e79c4bdbfd14316986d65e4`,
thanks :ghuser:`hameerabbasi`)
* Add order parameter to ``{zero, ones, full}[_like]``. (:issue:`514`, :commit:`37de1d0141c4375962ecdf18337c2dd0f667b60c`,
thanks :ghuser:`hameerabbasi`)
* Fix tensordot typing bugs. (:issue:`493`, :issue:`499`, :commit:`37de1d0141c4375962ecdf18337c2dd0f667b60c`,
thanks :ghuser:`hameerabbasi`).
0.12.0 / 2021-03-19
-------------------
There are a number of large changes in this release. For example, we have implemented the
:obj:`GCXS` type, and its specializations :obj:`CSR` and :obj:`CSC`. We plan on gradually improving
the performance of these.
* A number of :obj:`GCXS` fixes and additions (:pr:`409`, :pr:`407`, :pr:`414`,
:pr:`417`, :pr:`419` thanks :ghuser:`daletovar`)
* Ability to change the index dtype for better storage characteristics. (:pr:`441`,
thanks :ghuser:`daletovar`)
* Some work on :obj:`DOK` arrays to bring them closer to the other formats (:pr:`435`,
:pr:`437`, :pr:`439`, :pr:`440`, thanks :ghuser:`DragaDoncila`)
* :obj:`CSR` and :obj:`CSC` specializations of :obj:`GCXS` (:pr:`442`, thanks :ghuser:`ivirshup`)
For now, this is experimental undocumented API, and subject to change.
* Fix a number of bugs (:pr:`407`, :issue:`406`)
* Add ``nnz`` parameter to :obj:`sparse.random` (:pr:`410`, thanks :ghuser:`emilmelnikov`)
0.11.2 / 2020-09-04
-------------------
* Fix :obj:`TypingError` on :obj:`sparse.dot` with complex dtypes. (:issue:`403`, :pr:`404`)
0.11.1 / 2020-08-31
-------------------
* Fix :obj:`ValueError` on :obj:`sparse.dot` with extremely small values. (:issue:`398`, :pr:`399`)
0.11.0 / 2020-08-18
-------------------
* Improve the performance of :obj:`sparse.dot`. (:issue:`331`, :pr:`389`, thanks :ghuser:`daletovar`)
* Added the :obj:`COO.swapaxes` method. (:pr:`344`, thanks :ghuser:`lueckem`)
* Added multi-axis 1-D indexing support. (:pr:`343`, thanks :ghuser:`mikeymezher`)
* Fix :obj:`outer` for arrays that weren't one-dimensional. (:issue:`346`, :pr:`347`)
* Add ``casting`` kwarg to :obj:`COO.astype`. (:issue:`391`, :pr:`392`)
* Fix for :obj:`COO` constructor accepting invalid inputs. (:issue:`385`, :pr:`386`)
0.10.0 / 2020-05-13
-------------------
* Fixed a bug where converting an empty DOK array to COO leads
to an incorrect dtype. (:issue:`314`, :pr:`315`)
* Change code formatter to black. (:pr:`284`)
* Add :obj:`COO.flatten` and :obj:`sparse.outer`. (:issue:`316`, :pr:`317`).
* Remove broadcasting restriction between sparse arrays and dense arrays.
(:issue:`306`, :pr:`318`)
* Implement deterministic dask tokenization. (:issue:`300`, :pr:`320`, thanks
:ghuser:`danielballan`)
* Improve testing around densification (:pr:`321`, thanks
:ghuser:`danielballan`)
* Simplify Numba extension. (:pr:`324`, thanks :ghuser:`eric-wieser`).
* Respect ``copy=False`` in ``astype`` (:pr:`328`, thanks :ghuser:`eric-wieser`).
* Replace linear_loc with ravel_multi_index, which is 3x faster. (:pr:`330`,
thanks :ghuser:`eric-wieser`).
* Add error msg to tensordot operation when ``ndim==0`` (:issue:`332`,
:pr:`333`, thanks :ghuser:`guilhermeleobas`).
* Maintainence fixes for Sphinx 3.0 and Numba 0.49, and dropping support for
Python 3.5. (:pr:`337`).
* Fixed signature for :obj:`numpy.clip`.
0.9.1 / 2020-01-23
------------------
* Fixed a bug where indexing with an empty list could lead
to issues. (:issue:`281`, :pr:`282`)
* Change code formatter to black. (:pr:`284`)
* Add the :obj:`diagonal` and :obj:`diagonalize` functions.
(:issue:`288`, :pr:`289`, thanks :ghuser:`pettni`)
* Add HTML repr for notebooks. (:pr:`283`, thanks :ghuser:`daletovar`)
* Avoid making copy of ``coords`` when making a new :obj:`COO`
array.
* Add stack and concatenate for GCXS. (:issue:`301`, :pr:`303`, thanks
:ghuser:`daletovar`).
* Fix issue where functions dispatching to an attribute access wouldn't
work with ``__array_function__``. (:issue:`308`, :pr:`309`).
* Add partial support for constructing and mirroring :obj:`COO` objects to
Numba.
0.8.0 / 2019-08-26
------------------
This release switches to Numba's new typed lists, a lot of
back-end work with the CI infrastructure, so Linux, macOS
and Windows are officially tested. It also includes bug fixes.
It also adds in-progress, not yet public support for the GCXS
format, which is a generalisation of CSR/CSC. (huge thanks to
:ghuser:`daletovar`)
* Fixed a bug where an array with size == 1 and nnz == 0
could not be broadcast. (:issue:`242`, :pr:`243`)
* Add ``std`` and ``var``. (:pr:`244`)
* Move to Azure Pipelines with CI for Windows, macOS and
Linux. (:pr:`245`, :pr:`246`, :pr:`247`, :pr:`248`)
* Add ``resize``, and change ``reshape`` so it raises a
``ValueError`` on shapes that don't correspond to the
same size. (:issue:`241`, :issue:`250`, :pr:`256`
thanks, :ghuser:`daletovar`)
* Add ``isposinf`` and ``isneginf``. (:issue:`252`, :pr:`253`)
* Fix ``tensordot`` when nnz = 0. (:issue:`255`, :pr:`256`)
* Modifications to ``__array_function__`` to allow for sparse
XArrays. (:pr:`261`, thanks :ghuser:`nvictus`)
* Add not-yet-public support for GCXS. (:pr:`258`, thanks :ghuser:`daletovar`)
* Improvements to ``__array_function__``. (:pr:`267`, :pr:`272`, thanks
:ghuser:`crusaderky`)
* Convert all Numba lists to typed lists. (:pr:`264`)
* Why write code when it exists elsewhere? (:pr:`277`)
* Fix some element-wise operations with scalars. (:pr:`278`)
* Private modules should be private, and tests should be in the package.
(:pr:`280`)
0.7.0 / 2019-03-14
------------------
This is a release that adds compatibility with NumPy's new
``__array_function__`` protocol, for details refer to
`NEP-18 `_.
The other big change is that we dropped compatibility with
Python 2. Users on Python 2 should use version 0.6.0.
There are also some bug-fixes relating to fill-values.
This was mainly a contributor-driven release.
The full list of changes can be found below:
* Fixed a bug where going between :obj:`sparse.DOK` and
:obj:`sparse.COO` caused fill-values to be lost.
(:issue:`225`, :pr:`226`).
* Fixed warning for a matrix that was incorrectly considered
too dense. (:issue:`228`, :pr:`229`)
* Fixed some warnings in Python 3.7, the fix was needed.
in preparation for Python 3.8. (:pr:`233`, thanks :ghuser:`nils-werner`)
* Drop support for Python 2.7 (:issue:`234`, :pr:`235`, thanks
:ghuser:`hugovk`)
* Clearer error messages (:issue:`230`, :issue:`231`, :pr:`232`)
* Restructure requirements.txt files. (:pr:`236`)
* Support fill-value in reductions in specific cases. (:issue:`237`, :pr:`238`)
* Add ``__array_function__`` support. (:pr:`239`, thanks, :ghuser:`pentschev`)
* Cleaner code! (:pr:`240`)
0.6.0 / 2018-12-19
------------------
This release breaks backward-compatibility. Previously, if arrays were fed into
NumPy functions, an attempt would be made to densify the array and apply the NumPy
function. This was unintended behaviour in most cases, with the array filling up
memory before raising a ``MemoryError`` if the array was too large.
We have now changed this behaviour so that a ``RuntimeError`` is now raised if
an attempt is made to automatically densify an array. To densify, use the explicit
``.todense()`` method.
* Fixed a bug where ``np.matrix`` could sometimes fail to
convert to a ``COO``. (:issue:`199`, :pr:`200`).
* Make sure that ``sparse @ sparse`` returns a sparse array. (:issue:`201`, :pr:`203`)
* Bring ``operator.matmul`` behaviour in line with NumPy for ``ndim > 2``.
(:issue:`202`, :pr:`204`, :pr:`217`)
* Make sure ``dtype`` is preserved with the ``out`` kwarg. (:issue:`205`, :pr:`206`)
* Fix integer overflow in ``reduce`` on Windows. (:issue:`207`, :pr:`208`)
* Disallow auto-densification. (:issue:`218`, :pr:`220`)
* Add auto-densification configuration, and a configurable warning for checking
if the array is too dense. (:pr:`210`, :pr:`213`)
* Add pruning of fill-values to COO constructor. (:pr:`221`)
0.5.0 / 2018-10-12
------------------
* Added :code:`COO.real`, :code:`COO.imag`, and :code:`COO.conj` (:pr:`196`).
* Added :code:`sparse.kron` function (:pr:`194`, :pr:`195`).
* Added :code:`order` parameter to :code:`COO.reshape` to make it work with
:code:`np.reshape` (:pr:`193`).
* Added :code:`COO.mean` and :code:`sparse.nanmean` (:pr:`190`).
* Added :code:`sparse.full` and :code:`sparse.full_like` (:pr:`189`).
* Added :code:`COO.clip` method (:pr:`185`).
* Added :code:`COO.copy` method, and changed pickle of :code:`COO` to not
include its cache (:pr:`184`).
* Added :code:`sparse.eye`, :code:`sparse.zeros`, :code:`sparse.zeros_like`,
:code:`sparse.ones`, and :code:`sparse.ones_like` (:pr:`183`).
0.4.1 / 2018-09-12
------------------
* Allow mixed :code:`ndarray`-:code:`COO` operations if the result is sparse
(:issue:`124`, via :pr:`182`).
* Allow specifying a fill-value when converting from NumPy arrays
(:issue:`179`, via :pr:`180`).
* Added :code:`COO.any` and :code:`COO.all` methods (:pr:`175`).
* Indexing for :code:`COO` now accepts a single one-dimensional array index
(:pr:`172`).
* The fill-value can now be something other than zero or :code:`False`
(:pr:`165`).
* Added a :code:`sparse.roll` function (:pr:`160`).
* Numba code now releases the GIL. This leads to better multi-threaded
performance in Dask (:pr:`159`).
* A number of bugs occurred, so to resolve them, :code:`COO.coords.dtype` is
always :code:`np.int64`. :code:`COO`, therefore, uses more memory than
before (:pr:`158`).
* Add support for saving and loading :code:`COO` files from disk (:issue:`153`,
via :pr:`154`).
* Support :code:`COO.nonzero` and :code:`np.argwhere` (:issue:`145`, via
:pr:`148`).
* Allow faux in-place operations (:issue:`80`, via :pr:`146`).
* :code:`COO` is now always canonical (:pr:`141`).
* Improve indexing performance (:pr:`128`).
* Improve element-wise performance (:pr:`127`).
* Reductions now support a negative axis (:issue:`117`, via :pr:`118`).
* Match behaviour of :code:`ufunc.reduce` from NumPy (:issue:`107`, via
:pr:`108`).
0.3.1 / 2018-04-12
------------------
* Fix packaging error (:pr:`138`).
0.3.0 / 2018-02-22
------------------
* Add NaN-skipping aggregations (:pr:`102`).
* Add equivalent to :code:`np.where` (:pr:`102`).
* N-input universal functions now work (:pr:`98`).
* Make :code:`dot` more consistent with NumPy (:pr:`96`).
* Create a base class :code:`SparseArray` (:pr:`92`).
* Minimum NumPy version is now 1.13 (:pr:`90`).
* Fix a bug where setting a :code:`DOK` element to zero did nothing
(:issue:`93`, via :pr:`94`).
0.2.0 / 2018-01-25
------------------
* Support faster :code:`np.array(COO)` (:pr:`87`).
* Add :code:`DOK` type (:pr:`85`).
* Fix sum for large arrays (:issue:`82`, via :pr:`83`).
* Support :code:`.size` and :code:`.density` (:pr:`69`).
* Documentation added for the package (:pr:`43`).
* Minimum required SciPy version is now 0.19 (:pr:`70`).
* :code:`len(COO)` now works (:pr:`68`).
* :code:`scalar op COO` now works for all operators (:pr:`67`).
* Validate axes for :code:`.transpose()` (:pr:`61`).
* Extend indexing support (:pr:`57`).
* Add :code:`random` function for generating random sparse arrays (:pr:`41`).
* :code:`COO(COO)` now copies the original object (:pr:`55`).
* NumPy universal functions and reductions now work on :code:`COO` arrays
(:pr:`49`).
* Fix concatenate and stack for large arrays (:issue:`32`, via :pr:`51`).
* Fix :code:`nnz` for scalars (:issue:`47`, via :pr:`48`).
* Support more operators and remove all special cases (:pr:`46`).
* Add support for :code:`triu` and :code:`tril` (:pr:`40`).
* Add support for Ellipsis (:code:`...`) and :code:`None` when indexing
(:pr:`37`).
* Add support for bitwise bindary operations like :code:`&` and :code:`|`
(:pr:`38`).
* Support broadcasting in element-wise operations (:pr:`35`).
sparse-0.16.0a9/docs/conduct.rst 0000664 0000000 0000000 00000012451 14634755015 0016463 0 ustar 00root root 0000000 0000000 Contributor Covenant Code of Conduct
====================================
Our Pledge
----------
We as members, contributors, and leaders pledge to make participation in
our community a harassment-free experience for everyone, regardless of
age, body size, visible or invisible disability, ethnicity, sex
characteristics, gender identity and expression, level of experience,
education, socio-economic status, nationality, personal appearance,
race, religion, or sexual identity and orientation.
We pledge to act and interact in ways that contribute to an open,
welcoming, diverse, inclusive, and healthy community.
Our Standards
-------------
Examples of behavior that contributes to a positive environment for our
community include:
- Demonstrating empathy and kindness toward other people
- Being respectful of differing opinions, viewpoints, and experiences
- Giving and gracefully accepting constructive feedback
- Accepting responsibility and apologizing to those affected by our
mistakes, and learning from the experience
- Focusing on what is best not just for us as individuals, but for the
overall community
Examples of unacceptable behavior include:
- The use of sexualized language or imagery, and sexual attention or
advances of any kind
- Trolling, insulting or derogatory comments, and personal or political
attacks
- Public or private harassment
- Publishing others' private information, such as a physical or email
address, without their explicit permission
- Other conduct which could reasonably be considered inappropriate in a
professional setting
Enforcement Responsibilities
----------------------------
Community leaders are responsible for clarifying and enforcing our
standards of acceptable behavior and will take appropriate and fair
corrective action in response to any behavior that they deem
inappropriate, threatening, offensive, or harmful.
Community leaders have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other
contributions that are not aligned to this Code of Conduct, and will
communicate reasons for moderation decisions when appropriate.
Scope
-----
This Code of Conduct applies within all community spaces, and also
applies when an individual is officially representing the community in
public spaces. Examples of representing our community include using an
official e-mail address, posting via an official social media account,
or acting as an appointed representative at an online or offline event.
Enforcement
-----------
Instances of abusive, harassing, or otherwise unacceptable behavior may
be reported to the community leaders responsible for enforcement at
`hameerabbasi@yahoo.com `_. All complaints will be reviewed and
investigated promptly and fairly.
All community leaders are obligated to respect the privacy and security
of the reporter of any incident.
Enforcement Guidelines
----------------------
Community leaders will follow these Community Impact Guidelines in
determining the consequences for any action they deem in violation of
this Code of Conduct:
1. Correction
~~~~~~~~~~~~~
**Community Impact**: Use of inappropriate language or other behavior
deemed unprofessional or unwelcome in the community.
**Consequence**: A private, written warning from community leaders,
providing clarity around the nature of the violation and an explanation
of why the behavior was inappropriate. A public apology may be
requested.
2. Warning
~~~~~~~~~~
**Community Impact**: A violation through a single incident or series of
actions.
**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, for a specified period of
time. This includes avoiding interactions in community spaces as well as
external channels like social media. Violating these terms may lead to a
temporary or permanent ban.
3. Temporary Ban
~~~~~~~~~~~~~~~~
**Community Impact**: A serious violation of community standards,
including sustained inappropriate behavior.
**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No
public or private interaction with the people involved, including
unsolicited interaction with those enforcing the Code of Conduct, is
allowed during this period. Violating these terms may lead to a
permanent ban.
4. Permanent Ban
~~~~~~~~~~~~~~~~
**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of
individuals.
**Consequence**: A permanent ban from any sort of public interaction
within the community.
Attribution
-----------
This Code of Conduct is adapted from the `Contributor
Covenant `__, version 2.0,
available at
https://www.contributor-covenant.org/version/2/0/code\_of\_conduct.html.
Community Impact Guidelines were inspired by `Mozilla's code of conduct
enforcement ladder <:ghuser:`mozilla/diversity`>`__.
For answers to common questions about this code of conduct, see the FAQ
at https://www.contributor-covenant.org/faq. Translations are available
at https://www.contributor-covenant.org/translations.
sparse-0.16.0a9/docs/conf.py 0000664 0000000 0000000 00000014206 14634755015 0015571 0 ustar 00root root 0000000 0000000 #!/usr/bin/env python3
#
# sparse documentation build configuration file, created by
# sphinx-quickstart on Fri Dec 29 20:58:03 2017.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are commented out
# serve to show the default.
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import os
import sys
sys.path.insert(0, os.path.abspath(".."))
from sparse import __version__ # noqa: E402
# -- General configuration ------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
#
# needs_sphinx = '1.0'
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.doctest",
"sphinx.ext.intersphinx",
"sphinx.ext.coverage",
"sphinx.ext.mathjax",
"sphinx.ext.napoleon",
"sphinx.ext.viewcode",
"sphinx.ext.autosummary",
"sphinx.ext.inheritance_diagram",
"sphinx.ext.extlinks",
]
# Add any paths that contain templates here, relative to this directory.
templates_path = ["_templates"]
mathjax_path = "https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"
# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
#
# source_suffix = ['.rst', '.md']
source_suffix = ".rst"
# The main toctree document.
root_doc = "index"
# General information about the project.
project = "sparse"
copyright = "2018, Sparse developers"
author = "Sparse Developers"
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = __version__
# The full version, including alpha/beta/rc tags.
release = __version__
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = "en"
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This patterns also effect to html_static_path and html_extra_path
exclude_patterns = ["_build", "**tests**", "**setup**", "**extern**", "**data**"]
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = "sphinx"
# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = False
autosummary_generate = True
autosummary_generate_overwrite = False
# -- Options for HTML output ----------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = "sphinx_rtd_theme"
html_logo = "logo.svg"
html_favicon = "logo.png"
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#
# html_theme_options = {}
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
# html_static_path = ['_static']
# Custom sidebar templates, must be a dictionary that maps document names
# to template names.
#
# This is required for the alabaster theme
# refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars
# html_sidebars = {
# '**': [
# 'relations.html', # needs 'show_related': True theme option to display
# 'searchbox.html',
# ]
# }
# -- Options for HTMLHelp output ------------------------------------------
# Output file base name for HTML help builder.
htmlhelp_basename = "sparsedoc"
# -- Options for LaTeX output ---------------------------------------------
latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
#
# 'papersize': 'letterpaper',
# The font size ('10pt', '11pt' or '12pt').
#
# 'pointsize': '10pt',
# Additional stuff for the LaTeX preamble.
#
# 'preamble': '',
# Latex figure (float) alignment
#
# 'figure_align': 'htbp',
}
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [(root_doc, "sparse.tex", "sparse Documentation", "Sparse Developers", "manual")]
# -- Options for manual page output ---------------------------------------
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [(root_doc, "sparse", "sparse Documentation", [author], 1)]
# -- Options for Texinfo output -------------------------------------------
# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(
root_doc,
"sparse",
"sparse Documentation",
author,
"sparse",
"One line description of project.",
"Miscellaneous",
)
]
# Example configuration for intersphinx: refer to the Python standard library.
intersphinx_mapping = {
"python": ("https://docs.python.org/3", None),
"numpy": ("https://docs.scipy.org/doc/numpy", None),
"scipy": ("https://docs.scipy.org/doc/scipy", None),
}
extlinks = {
"issue": ("https://github.com/pydata/sparse/issues/%s", "Issue #%s"),
"pr": ("https://github.com/pydata/sparse/pull/%s", "PR #%s"),
"ghuser": ("https://github.com/%s", "@%s"),
"commit": ("https://github.com/pydata/sparse/commit/%s", "%s"),
"compare": ("https://github.com/pydata/sparse/commit/%s", "%s"),
}
sparse-0.16.0a9/docs/construct.rst 0000664 0000000 0000000 00000020173 14634755015 0017050 0 ustar 00root root 0000000 0000000 .. currentmodule:: sparse
Construct Sparse Arrays
=======================
From coordinates and data
-------------------------
You can construct :obj:`COO` arrays from coordinates and value data.
The :code:`coords` parameter contains the indices where the data is nonzero,
and the :code:`data` parameter contains the data corresponding to those indices.
For example, the following code will generate a :math:`5 \times 5` diagonal
matrix:
.. code-block:: python
>>> import sparse
>>> coords = [[0, 1, 2, 3, 4],
... [0, 1, 2, 3, 4]]
>>> data = [10, 20, 30, 40, 50]
>>> s = sparse.COO(coords, data, shape=(5, 5))
>>> s
0 1 2 3 4
┌ â”
0 │ 10 │
1 │ 20 │
2 │ 30 │
3 │ 40 │
4 │ 50 │
└ ┘
In general :code:`coords` should be a :code:`(ndim, nnz)` shaped
array. Each row of :code:`coords` contains one dimension of the
desired sparse array, and each column contains the index
corresponding to that nonzero element. :code:`data` contains
the nonzero elements of the array corresponding to the indices
in :code:`coords`. Its shape should be :code:`(nnz,)`.
If ``data`` is the same across all the coordinates, it can be passed
in as a scalar. For example, the following produces the :math:`4 \times 4`
identity matrix:
.. code-block:: python
>>> import sparse
>>> coords = [[0, 1, 2, 3],
... [0, 1, 2, 3]]
>>> data = 1
>>> s = sparse.COO(coords, data, shape=(4, 4))
>>> s
0 1 2 3
┌ â”
0 │ 1 │
1 │ 1 │
2 │ 1 │
3 │ 1 │
└ ┘
You can, and should, pass in :obj:`numpy.ndarray` objects for
:code:`coords` and :code:`data`.
In this case, the shape of the resulting array was determined from
the maximum index in each dimension. If the array extends beyond
the maximum index in :code:`coords`, you should supply a shape
explicitly. For example, if we did the following without the
:code:`shape` keyword argument, it would result in a
:math:`4 \times 5` matrix, but maybe we wanted one that was actually
:math:`5 \times 5`.
.. code-block:: python
>>> coords = [[0, 3, 2, 1], [4, 1, 2, 0]]
>>> data = [1, 4, 2, 1]
>>> s = COO(coords, data, shape=(5, 5))
>>> s
0 1 2 3 4
┌ â”
0 │ 1 │
1 │ 1 │
2 │ 2 │
3 │ 4 │
4 │ │
└ ┘
:obj:`COO` arrays support arbitrary fill values. Fill values are the "default"
value, or value to not store. This can be given a value other than zero. For
example, the following builds a (bad) representation of a :math:`2 \times 2`
identity matrix. Note that not all operations are supported for operations
with nonzero fill values.
.. code-block:: python
>>> coords = [[0, 1], [1, 0]]
>>> data = [0, 0]
>>> s = COO(coords, data, fill_value=1)
>>> s
0 1
┌ â”
0 │ 0 │
1 │ 0 │
└ ┘
From :std:doc:`Scipy sparse matrices `
---------------------------------------------------------------------------------------
To construct :obj:`COO` array from :obj:`spmatrix `
objects, you can use the :obj:`COO.from_scipy_sparse` method. As an
example, if :code:`x` is a :obj:`scipy.sparse.spmatrix`, you can
do the following to get an equivalent :obj:`COO` array:
.. code-block:: python
s = COO.from_scipy_sparse(x)
From :doc:`Numpy arrays `
------------------------------------------------------------------
To construct :obj:`COO` arrays from :obj:`numpy.ndarray`
objects, you can use the :obj:`COO.from_numpy` method. As an
example, if :code:`x` is a :obj:`numpy.ndarray`, you can
do the following to get an equivalent :obj:`COO` array:
.. code-block:: python
s = COO.from_numpy(x)
Generating random :obj:`COO` objects
------------------------------------
The :obj:`sparse.random` method can be used to create random
:obj:`COO` arrays. For example, the following will generate
a :math:`10 \times 10` matrix with :math:`10` nonzero entries,
each in the interval :math:`[0, 1)`.
.. code-block:: python
s = sparse.random((10, 10), density=0.1)
Building :obj:`COO` Arrays from :obj:`DOK` Arrays
-------------------------------------------------
It's possible to build :obj:`COO` arrays from :obj:`DOK` arrays, if it is not
easy to construct the :code:`coords` and :obj:`data` in a simple way. :obj:`DOK`
arrays provide a simple builder interface to build :obj:`COO` arrays, but at
this time, they can do little else.
You can get started by defining the shape (and optionally, datatype) of the
:obj:`DOK` array. If you do not specify a dtype, it is inferred from the value
dictionary or is set to :code:`dtype('float64')` if that is not present.
.. code-block:: python
s = DOK((6, 5, 2))
s2 = DOK((2, 3, 4), dtype=np.uint8)
After this, you can build the array by assigning arrays or scalars to elements
or slices of the original array. Broadcasting rules are followed.
.. code-block:: python
s[1:3, 3:1:-1] = [[6, 5]]
DOK arrays also support fancy indexing assignment if and only if all dimensions are indexed.
.. code-block:: python
s[[0, 2], [2, 1], [0, 1]] = 5
s[[0, 3], [0, 4], [0, 1]] = [1, 5]
Alongside indexing assignment and retrieval, :obj:`DOK` arrays support any arbitrary broadcasting function
to any number of arguments where the arguments can be :obj:`SparseArray` objects, :obj:`scipy.sparse.spmatrix`
objects, or :obj:`numpy.ndarrays`.
.. code-block:: python
x = sparse.random((10, 10), 0.5, format="dok")
y = sparse.random((10, 10), 0.5, format="dok")
sparse.elemwise(np.add, x, y)
:obj:`DOK` arrays also support standard ufuncs and operators, including comparison operators,
in combination with other objects implementing the `numpy` `ndarray.__array_ufunc__` method. For example,
the following code will perform elementwise equality comparison on the two arrays
and return a new boolean :obj:`DOK` array.
.. code-block:: python
x = sparse.random((10, 10), 0.5, format="dok")
y = np.random.random((10, 10))
x == y
:obj:`DOK` arrays are returned from elemwise functions and standard ufuncs if and only if all
:obj:`SparseArray` objects are obj:`DOK` arrays. Otherwise, a :obj:`COO` array or dense array are returned.
At the end, you can convert the :obj:`DOK` array to a :obj:`COO` arrays.
.. code-block:: python
s3 = COO(s)
In addition, it is possible to access single elements and slices of the :obj:`DOK` array
using normal Numpy indexing, as well as fancy indexing if and only if all dimensions are indexed.
Slicing and fancy indexing will always return a new DOK array.
.. code-block:: python
s[1, 2, 1] # 5
s[5, 1, 1] # 0
s[[0, 3], [0, 4], [0, 1]] #
.. _converting:
Converting :obj:`COO` objects to other Formats
----------------------------------------------
:obj:`COO` arrays can be converted to :doc:`Numpy arrays `,
or to some :obj:`spmatrix ` subclasses via the following
methods:
* :obj:`COO.todense`: Converts to a :obj:`numpy.ndarray` unconditionally.
* :obj:`COO.maybe_densify`: Converts to a :obj:`numpy.ndarray` based on
certain constraints.
* :obj:`COO.to_scipy_sparse`: Converts to a :obj:`scipy.sparse.coo_matrix` if
the array is two dimensional.
* :obj:`COO.tocsr`: Converts to a :obj:`scipy.sparse.csr_matrix` if
the array is two dimensional.
* :obj:`COO.tocsc`: Converts to a :obj:`scipy.sparse.csc_matrix` if
the array is two dimensional.
sparse-0.16.0a9/docs/contributing.rst 0000664 0000000 0000000 00000011054 14634755015 0017531 0 ustar 00root root 0000000 0000000 Contributing
============
General Guidelines
------------------
sparse is a community-driven project on GitHub. You can find our
`repository on GitHub <:ghuser:`pydata/sparse`>`_. Feel
free to open issues for new features or bugs, or open a pull request
to fix a bug or add a new feature.
If you haven't contributed to open-source before, we recommend you read
`this excellent guide by GitHub on how to contribute to open source
`_. The guide is long,
so you can gloss over things you're familiar with.
If you're not already familiar with it, we follow the `fork and pull model
`_
on GitHub.
Filing Issues
-------------
If you find a bug or would like a new feature, you might want to `consider
filing a new issue on GitHub <:ghuser:`pydata/sparse/issues`>`_. Before
you open a new issue, please make sure of the following:
* This should go without saying, but make sure what you are requesting is within
the scope of this project.
* The bug/feature is still present/missing on the ``main`` branch on GitHub.
* A similar issue or pull request isn't already open. If one already is, it's better
to contribute to the discussion there.
Contributing Code
-----------------
This project has a number of requirements for all code contributed.
* We use ``pre-commit`` to automatically lint the code and maintain code style.
* We use Numpy-style docstrings.
* It's ideal if user-facing API changes or new features have documentation added.
* 100% code coverage is recommended for all new code in any submitted PR. Doctests
count toward coverage.
* Performance optimizations should have benchmarks added in ``benchmarks``.
Setting up Your Development Environment
---------------------------------------
The following bash script is all you need to set up your development environment,
after forking and cloning the repository:
.. code-block:: bash
pip install -e .[all]
Running/Adding Unit Tests
-------------------------
It is best if all new functionality and/or bug fixes have unit tests added
with each use-case.
We use `pytest `_ as our unit testing framework,
with the ``pytest-cov`` extension to check code coverage and ``pytest-flake8`` to
check code style. You don't need to configure these extensions yourself. Once you've
configured your environment, you can just ``cd`` to the root of your repository and run
.. code-block:: bash
pytest --pyargs sparse
This automatically checks code style and functionality, and prints code coverage,
even though it doesn't fail on low coverage.
Unit tests are automatically run on Travis CI for pull requests.
Coverage
--------
The ``pytest`` script automatically reports coverage, both on the terminal for
missing line numbers, and in annotated HTML form in ``htmlcov/index.html``.
Coverage is automatically checked on CodeCov for pull requests.
Adding/Building the Documentation
---------------------------------
If a feature is stable and relatively finalized, it is time to add it to the
documentation. If you are adding any private/public functions, it is best to
add docstrings, to aid in reviewing code and also for the API reference.
We use `Numpy style docstrings `_
and `Sphinx `_ to document this library.
Sphinx, in turn, uses `reStructuredText `_
as its markup language for adding code.
We use the `Sphinx Autosummary extension `_
to generate API references. In particular, you may want do look at the :code:`docs/generated`
directory to see how these files look and where to add new functions, classes or modules.
For example, if you add a new function to the :code:`sparse.COO` class, you would open up
:code:`docs/generated/sparse.COO.rst`, and add in the name of the function where appropriate.
To build the documentation, you can :code:`cd` into the :code:`docs` directory
and run
.. code-block:: bash
sphinx-build -W -b html . _build/html
After this, you can find an HTML version of the documentation in :code:`docs/_build/html/index.html`.
Documentation for pull requests is automatically built on CircleCI and can be found in the build
artifacts.
Adding and Running Benchmarks
-----------------------------
We use `Airspeed Velocity `_ to run benchmarks. We have it set
up to use ``conda``, but you can edit the configuration locally if you so wish.
sparse-0.16.0a9/docs/gen_logo.py 0000664 0000000 0000000 00000006271 14634755015 0016440 0 ustar 00root root 0000000 0000000 import xml.etree.ElementTree as et
import numpy as np
def transform(a, b, c, d, e, f):
return f"matrix({a},{b},{c},{d},{e},{f})"
def fill(rs):
"""Generates opacity at random, weighted a bit toward 0 and 1"""
x = rs.choice(np.arange(5), p=[0.3, 0.2, 0.0, 0.2, 0.3]) / 4
return f"fill-opacity:{x:.1f}"
rs = np.random.RandomState(1)
colors = {
"orange": "fill:rgb(241,141,59)",
"blue": "fill:rgb(69,155,181)",
"grey": "fill:rgb(103,124,131)",
}
s = 10 # face size
offset_x = 10 # x margin
offset_y = 10 # y margin
b = np.tan(np.deg2rad(30)) # constant for transformations
# reused attributes for small squares
kwargs = {"x": "0", "y": "0", "width": f"{s}", "height": f"{s}", "stroke": "white"}
# large white squares for background
bg_kwargs = {**kwargs, "width": f"{5*s}", "height": f"{5*s}", "style": "fill:white;"}
root = et.Element(
"svg",
**{
"width": f"{s * 10 + 2 * offset_x}",
"height": f"{s * 20 + 2 * offset_y}",
"viewbox": f"0 0 {s * 10 + 2 * offset_x} {s * 20 + 2 * offset_y}",
"version": "1.1",
"style": "fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;",
"xmlns": "http://www.w3.org/2000/svg",
"xmlns:xlink": "http://www.w3.org/1999/xlink",
"xml:space": "preserve",
"xmlns:serif": "http://www.serif.com/",
"class": "align-center",
},
)
# face 1 (left, orange)
et.SubElement(
root,
"rect",
transform=transform(1, b, 0, 1, 5 * s + offset_x, offset_y),
**bg_kwargs,
)
for i, j in np.ndindex(5, 5):
et.SubElement(
root,
"rect",
style=f"{colors['orange']};{fill(rs)};",
transform=transform(1, b, 0, 1, (i + 5) * s + offset_x, (i * b + j) * s + offset_y),
**kwargs,
)
# face 2 (top, orange)
et.SubElement(
root,
"rect",
transform=transform(1, b, -1, b, 5 * s + offset_x, 5 * s + offset_y),
**bg_kwargs,
)
for i, j in np.ndindex(5, 5):
et.SubElement(
root,
"rect",
style=f"{colors['orange']};{fill(rs)};",
transform=transform(
1,
b,
-1,
b,
(i - j + 5) * s + offset_x,
(i * b + j * b + 5) * s + offset_y,
),
**kwargs,
)
# face 3 (left, blue)
for y2 in (5 + b * 5, 10 + b * 5):
et.SubElement(
root,
"rect",
transform=transform(1, b, 0, 1, offset_x, y2 * s + offset_y),
**bg_kwargs,
)
for i, j in np.ndindex(5, 5):
et.SubElement(
root,
"rect",
style=f"{colors['blue']};{fill(rs)};",
transform=transform(1, b, 0, 1, i * s + offset_x, (i * b + j + y2) * s + offset_y),
**kwargs,
)
# face 4 (right, grey)
et.SubElement(
root,
"rect",
transform=transform(1, -b, 0, 1, 5 * s + offset_x, (10 * b + 5) * s + offset_y),
**bg_kwargs,
)
for i, j in np.ndindex(5, 5):
et.SubElement(
root,
"rect",
style=f"{colors['grey']};{fill(rs)};",
transform=transform(1, -b, 0, 1, (i + 5) * s + offset_x, ((10 - i) * b + j + 5) * s + offset_y),
**kwargs,
)
et.ElementTree(root).write("logo.svg", encoding="UTF-8")
sparse-0.16.0a9/docs/generated/ 0000775 0000000 0000000 00000000000 14634755015 0016225 5 ustar 00root root 0000000 0000000 sparse-0.16.0a9/docs/generated/sparse.COO.T.rst 0000664 0000000 0000000 00000000103 14634755015 0021067 0 ustar 00root root 0000000 0000000 COO\.T
======
.. currentmodule:: sparse
.. autoattribute:: COO.T
sparse-0.16.0a9/docs/generated/sparse.COO.all.rst 0000664 0000000 0000000 00000000104 14634755015 0021435 0 ustar 00root root 0000000 0000000 COO.all
=======
.. currentmodule:: sparse
.. automethod:: COO.all
sparse-0.16.0a9/docs/generated/sparse.COO.any.rst 0000664 0000000 0000000 00000000104 14634755015 0021454 0 ustar 00root root 0000000 0000000 COO.any
=======
.. currentmodule:: sparse
.. automethod:: COO.any
sparse-0.16.0a9/docs/generated/sparse.COO.asformat.rst 0000664 0000000 0000000 00000000123 14634755015 0022502 0 ustar 00root root 0000000 0000000 COO.asformat
============
.. currentmodule:: sparse
.. automethod:: COO.asformat
sparse-0.16.0a9/docs/generated/sparse.COO.astype.rst 0000664 0000000 0000000 00000000117 14634755015 0022176 0 ustar 00root root 0000000 0000000 COO\.astype
===========
.. currentmodule:: sparse
.. automethod:: COO.astype
sparse-0.16.0a9/docs/generated/sparse.COO.broadcast_to.rst 0000664 0000000 0000000 00000000143 14634755015 0023334 0 ustar 00root root 0000000 0000000 COO\.broadcast\_to
==================
.. currentmodule:: sparse
.. automethod:: COO.broadcast_to
sparse-0.16.0a9/docs/generated/sparse.COO.clip.rst 0000664 0000000 0000000 00000000111 14634755015 0021612 0 ustar 00root root 0000000 0000000 COO\.clip
=========
.. currentmodule:: sparse
.. automethod:: COO.clip
sparse-0.16.0a9/docs/generated/sparse.COO.conj.rst 0000664 0000000 0000000 00000000111 14634755015 0021614 0 ustar 00root root 0000000 0000000 COO\.conj
=========
.. currentmodule:: sparse
.. automethod:: COO.conj
sparse-0.16.0a9/docs/generated/sparse.COO.copy.rst 0000664 0000000 0000000 00000000111 14634755015 0021635 0 ustar 00root root 0000000 0000000 COO\.copy
=========
.. currentmodule:: sparse
.. automethod:: COO.copy
sparse-0.16.0a9/docs/generated/sparse.COO.density.rst 0000664 0000000 0000000 00000000125 14634755015 0022347 0 ustar 00root root 0000000 0000000 COO\.density
============
.. currentmodule:: sparse
.. autoattribute:: COO.density
sparse-0.16.0a9/docs/generated/sparse.COO.dot.rst 0000664 0000000 0000000 00000000106 14634755015 0021455 0 ustar 00root root 0000000 0000000 COO\.dot
========
.. currentmodule:: sparse
.. automethod:: COO.dot
sparse-0.16.0a9/docs/generated/sparse.COO.dtype.rst 0000664 0000000 0000000 00000000117 14634755015 0022016 0 ustar 00root root 0000000 0000000 COO\.dtype
==========
.. currentmodule:: sparse
.. autoattribute:: COO.dtype
sparse-0.16.0a9/docs/generated/sparse.COO.enable_caching.rst 0000664 0000000 0000000 00000000151 14634755015 0023571 0 ustar 00root root 0000000 0000000 COO\.enable\_caching
====================
.. currentmodule:: sparse
.. automethod:: COO.enable_caching
sparse-0.16.0a9/docs/generated/sparse.COO.flatten.rst 0000664 0000000 0000000 00000000120 14634755015 0022320 0 ustar 00root root 0000000 0000000 COO.flatten
===========
.. currentmodule:: sparse
.. automethod:: COO.flatten
sparse-0.16.0a9/docs/generated/sparse.COO.from_iter.rst 0000664 0000000 0000000 00000000130 14634755015 0022652 0 ustar 00root root 0000000 0000000 COO.from\_iter
==============
.. currentmodule:: sparse
.. automethod:: COO.from_iter
sparse-0.16.0a9/docs/generated/sparse.COO.from_numpy.rst 0000664 0000000 0000000 00000000135 14634755015 0023064 0 ustar 00root root 0000000 0000000 COO\.from\_numpy
================
.. currentmodule:: sparse
.. automethod:: COO.from_numpy
sparse-0.16.0a9/docs/generated/sparse.COO.from_scipy_sparse.rst 0000664 0000000 0000000 00000000164 14634755015 0024422 0 ustar 00root root 0000000 0000000 COO\.from\_scipy\_sparse
========================
.. currentmodule:: sparse
.. automethod:: COO.from_scipy_sparse
sparse-0.16.0a9/docs/generated/sparse.COO.imag.rst 0000664 0000000 0000000 00000000114 14634755015 0021603 0 ustar 00root root 0000000 0000000 COO\.imag
=========
.. currentmodule:: sparse
.. autoattribute:: COO.imag
sparse-0.16.0a9/docs/generated/sparse.COO.linear_loc.rst 0000664 0000000 0000000 00000000135 14634755015 0023000 0 ustar 00root root 0000000 0000000 COO\.linear\_loc
================
.. currentmodule:: sparse
.. automethod:: COO.linear_loc
sparse-0.16.0a9/docs/generated/sparse.COO.max.rst 0000664 0000000 0000000 00000000106 14634755015 0021454 0 ustar 00root root 0000000 0000000 COO\.max
========
.. currentmodule:: sparse
.. automethod:: COO.max
sparse-0.16.0a9/docs/generated/sparse.COO.maybe_densify.rst 0000664 0000000 0000000 00000000146 14634755015 0023511 0 ustar 00root root 0000000 0000000 COO\.maybe\_densify
===================
.. currentmodule:: sparse
.. automethod:: COO.maybe_densify
sparse-0.16.0a9/docs/generated/sparse.COO.mean.rst 0000664 0000000 0000000 00000000111 14634755015 0021603 0 ustar 00root root 0000000 0000000 COO\.mean
=========
.. currentmodule:: sparse
.. automethod:: COO.mean
sparse-0.16.0a9/docs/generated/sparse.COO.min.rst 0000664 0000000 0000000 00000000106 14634755015 0021452 0 ustar 00root root 0000000 0000000 COO\.min
========
.. currentmodule:: sparse
.. automethod:: COO.min
sparse-0.16.0a9/docs/generated/sparse.COO.nbytes.rst 0000664 0000000 0000000 00000000122 14634755015 0022171 0 ustar 00root root 0000000 0000000 COO\.nbytes
===========
.. currentmodule:: sparse
.. autoattribute:: COO.nbytes
sparse-0.16.0a9/docs/generated/sparse.COO.ndim.rst 0000664 0000000 0000000 00000000114 14634755015 0021615 0 ustar 00root root 0000000 0000000 COO\.ndim
=========
.. currentmodule:: sparse
.. autoattribute:: COO.ndim
sparse-0.16.0a9/docs/generated/sparse.COO.nnz.rst 0000664 0000000 0000000 00000000111 14634755015 0021470 0 ustar 00root root 0000000 0000000 COO\.nnz
========
.. currentmodule:: sparse
.. autoattribute:: COO.nnz
sparse-0.16.0a9/docs/generated/sparse.COO.nonzero.rst 0000664 0000000 0000000 00000000120 14634755015 0022355 0 ustar 00root root 0000000 0000000 COO.nonzero
===========
.. currentmodule:: sparse
.. automethod:: COO.nonzero
sparse-0.16.0a9/docs/generated/sparse.COO.prod.rst 0000664 0000000 0000000 00000000111 14634755015 0021627 0 ustar 00root root 0000000 0000000 COO\.prod
=========
.. currentmodule:: sparse
.. automethod:: COO.prod
sparse-0.16.0a9/docs/generated/sparse.COO.real.rst 0000664 0000000 0000000 00000000114 14634755015 0021611 0 ustar 00root root 0000000 0000000 COO\.real
=========
.. currentmodule:: sparse
.. autoattribute:: COO.real
sparse-0.16.0a9/docs/generated/sparse.COO.reduce.rst 0000664 0000000 0000000 00000000117 14634755015 0022140 0 ustar 00root root 0000000 0000000 COO\.reduce
===========
.. currentmodule:: sparse
.. automethod:: COO.reduce
sparse-0.16.0a9/docs/generated/sparse.COO.reshape.rst 0000664 0000000 0000000 00000000122 14634755015 0022314 0 ustar 00root root 0000000 0000000 COO\.reshape
============
.. currentmodule:: sparse
.. automethod:: COO.reshape
sparse-0.16.0a9/docs/generated/sparse.COO.resize.rst 0000664 0000000 0000000 00000000115 14634755015 0022170 0 ustar 00root root 0000000 0000000 COO.resize
==========
.. currentmodule:: sparse
.. automethod:: COO.resize
sparse-0.16.0a9/docs/generated/sparse.COO.round.rst 0000664 0000000 0000000 00000000114 14634755015 0022015 0 ustar 00root root 0000000 0000000 COO\.round
==========
.. currentmodule:: sparse
.. automethod:: COO.round
sparse-0.16.0a9/docs/generated/sparse.COO.rst 0000664 0000000 0000000 00000003034 14634755015 0020673 0 ustar 00root root 0000000 0000000 COO
===
.. currentmodule:: sparse
.. autoclass:: COO
.. note:: :obj:`COO` objects also support :ref:`operators `
and :ref:`indexing `
.. rubric:: Attributes
.. autosummary::
:toctree:
COO.T
COO.dtype
COO.nbytes
COO.ndim
COO.nnz
COO.size
COO.density
COO.imag
COO.real
.. rubric:: :doc:`Constructing COO objects <../construct>`
.. autosummary::
:toctree:
COO.from_iter
COO.from_numpy
COO.from_scipy_sparse
.. rubric:: :ref:`Element-wise operations `
.. autosummary::
:toctree:
COO.astype
COO.conj
COO.clip
COO.round
.. rubric:: :ref:`Reductions `
.. autosummary::
:toctree:
COO.reduce
COO.sum
COO.prod
COO.min
COO.max
COO.any
COO.all
COO.mean
COO.std
COO.var
.. rubric:: :ref:`Converting to other formats `
.. autosummary::
:toctree:
COO.asformat
COO.todense
COO.maybe_densify
COO.to_scipy_sparse
COO.tocsc
COO.tocsr
.. rubric:: :ref:`Other operations `
.. autosummary::
:toctree:
COO.copy
COO.dot
COO.flatten
COO.reshape
COO.resize
COO.transpose
COO.swapaxes
COO.nonzero
.. rubric:: Utility functions
.. autosummary::
:toctree:
COO.broadcast_to
COO.enable_caching
COO.linear_loc
sparse-0.16.0a9/docs/generated/sparse.COO.size.rst 0000664 0000000 0000000 00000000114 14634755015 0021640 0 ustar 00root root 0000000 0000000 COO\.size
=========
.. currentmodule:: sparse
.. autoattribute:: COO.size
sparse-0.16.0a9/docs/generated/sparse.COO.std.rst 0000664 0000000 0000000 00000000104 14634755015 0021457 0 ustar 00root root 0000000 0000000 COO.std
=======
.. currentmodule:: sparse
.. automethod:: COO.std
sparse-0.16.0a9/docs/generated/sparse.COO.sum.rst 0000664 0000000 0000000 00000000106 14634755015 0021473 0 ustar 00root root 0000000 0000000 COO\.sum
========
.. currentmodule:: sparse
.. automethod:: COO.sum
sparse-0.16.0a9/docs/generated/sparse.COO.swapaxes.rst 0000664 0000000 0000000 00000000123 14634755015 0022521 0 ustar 00root root 0000000 0000000 COO.swapaxes
============
.. currentmodule:: sparse
.. automethod:: COO.swapaxes
sparse-0.16.0a9/docs/generated/sparse.COO.to_scipy_sparse.rst 0000664 0000000 0000000 00000000156 14634755015 0024102 0 ustar 00root root 0000000 0000000 COO\.to\_scipy\_sparse
======================
.. currentmodule:: sparse
.. automethod:: COO.to_scipy_sparse
sparse-0.16.0a9/docs/generated/sparse.COO.tocsc.rst 0000664 0000000 0000000 00000000114 14634755015 0022001 0 ustar 00root root 0000000 0000000 COO\.tocsc
==========
.. currentmodule:: sparse
.. automethod:: COO.tocsc
sparse-0.16.0a9/docs/generated/sparse.COO.tocsr.rst 0000664 0000000 0000000 00000000114 14634755015 0022020 0 ustar 00root root 0000000 0000000 COO\.tocsr
==========
.. currentmodule:: sparse
.. automethod:: COO.tocsr
sparse-0.16.0a9/docs/generated/sparse.COO.todense.rst 0000664 0000000 0000000 00000000122 14634755015 0022326 0 ustar 00root root 0000000 0000000 COO\.todense
============
.. currentmodule:: sparse
.. automethod:: COO.todense
sparse-0.16.0a9/docs/generated/sparse.COO.transpose.rst 0000664 0000000 0000000 00000000130 14634755015 0022702 0 ustar 00root root 0000000 0000000 COO\.transpose
==============
.. currentmodule:: sparse
.. automethod:: COO.transpose
sparse-0.16.0a9/docs/generated/sparse.COO.var.rst 0000664 0000000 0000000 00000000104 14634755015 0021455 0 ustar 00root root 0000000 0000000 COO.var
=======
.. currentmodule:: sparse
.. automethod:: COO.var
sparse-0.16.0a9/docs/generated/sparse.DOK.asformat.rst 0000664 0000000 0000000 00000000123 14634755015 0022477 0 ustar 00root root 0000000 0000000 DOK.asformat
============
.. currentmodule:: sparse
.. automethod:: DOK.asformat
sparse-0.16.0a9/docs/generated/sparse.DOK.density.rst 0000664 0000000 0000000 00000000125 14634755015 0022344 0 ustar 00root root 0000000 0000000 DOK\.density
============
.. currentmodule:: sparse
.. autoattribute:: DOK.density
sparse-0.16.0a9/docs/generated/sparse.DOK.from_coo.rst 0000664 0000000 0000000 00000000127 14634755015 0022472 0 ustar 00root root 0000000 0000000 DOK\.from\_coo
==============
.. currentmodule:: sparse
.. automethod:: DOK.from_coo
sparse-0.16.0a9/docs/generated/sparse.DOK.from_numpy.rst 0000664 0000000 0000000 00000000135 14634755015 0023061 0 ustar 00root root 0000000 0000000 DOK\.from\_numpy
================
.. currentmodule:: sparse
.. automethod:: DOK.from_numpy
sparse-0.16.0a9/docs/generated/sparse.DOK.from_scipy_sparse.rst 0000664 0000000 0000000 00000000162 14634755015 0024415 0 ustar 00root root 0000000 0000000 DOK.from\_scipy\_sparse
=======================
.. currentmodule:: sparse
.. automethod:: DOK.from_scipy_sparse
sparse-0.16.0a9/docs/generated/sparse.DOK.ndim.rst 0000664 0000000 0000000 00000000114 14634755015 0021612 0 ustar 00root root 0000000 0000000 DOK\.ndim
=========
.. currentmodule:: sparse
.. autoattribute:: DOK.ndim
sparse-0.16.0a9/docs/generated/sparse.DOK.nnz.rst 0000664 0000000 0000000 00000000111 14634755015 0021465 0 ustar 00root root 0000000 0000000 DOK\.nnz
========
.. currentmodule:: sparse
.. autoattribute:: DOK.nnz
sparse-0.16.0a9/docs/generated/sparse.DOK.rst 0000664 0000000 0000000 00000000576 14634755015 0020700 0 ustar 00root root 0000000 0000000 DOK
===
.. currentmodule:: sparse
.. autoclass:: DOK
.. rubric:: Attributes
.. autosummary::
:toctree:
DOK.density
DOK.ndim
DOK.nnz
DOK.size
.. rubric:: Methods
.. autosummary::
:toctree:
DOK.asformat
DOK.from_coo
DOK.from_numpy
DOK.from_scipy_sparse
DOK.to_coo
DOK.todense
sparse-0.16.0a9/docs/generated/sparse.DOK.size.rst 0000664 0000000 0000000 00000000114 14634755015 0021635 0 ustar 00root root 0000000 0000000 DOK\.size
=========
.. currentmodule:: sparse
.. autoattribute:: DOK.size
sparse-0.16.0a9/docs/generated/sparse.DOK.to_coo.rst 0000664 0000000 0000000 00000000121 14634755015 0022143 0 ustar 00root root 0000000 0000000 DOK\.to\_coo
============
.. currentmodule:: sparse
.. automethod:: DOK.to_coo
sparse-0.16.0a9/docs/generated/sparse.DOK.todense.rst 0000664 0000000 0000000 00000000122 14634755015 0022323 0 ustar 00root root 0000000 0000000 DOK\.todense
============
.. currentmodule:: sparse
.. automethod:: DOK.todense
sparse-0.16.0a9/docs/generated/sparse.GCXS.T.rst 0000664 0000000 0000000 00000000103 14634755015 0021213 0 ustar 00root root 0000000 0000000 GCXS.T
======
.. currentmodule:: sparse
.. autoproperty:: GCXS.T
sparse-0.16.0a9/docs/generated/sparse.GCXS.__init__.rst 0000664 0000000 0000000 00000000136 14634755015 0022555 0 ustar 00root root 0000000 0000000 GCXS.\_\_init\_\_
=================
.. currentmodule:: sparse
.. automethod:: GCXS.__init__
sparse-0.16.0a9/docs/generated/sparse.GCXS.all.rst 0000664 0000000 0000000 00000000107 14634755015 0021564 0 ustar 00root root 0000000 0000000 GCXS.all
========
.. currentmodule:: sparse
.. automethod:: GCXS.all
sparse-0.16.0a9/docs/generated/sparse.GCXS.amax.rst 0000664 0000000 0000000 00000000112 14634755015 0021736 0 ustar 00root root 0000000 0000000 GCXS.amax
=========
.. currentmodule:: sparse
.. automethod:: GCXS.amax
sparse-0.16.0a9/docs/generated/sparse.GCXS.amin.rst 0000664 0000000 0000000 00000000112 14634755015 0021734 0 ustar 00root root 0000000 0000000 GCXS.amin
=========
.. currentmodule:: sparse
.. automethod:: GCXS.amin
sparse-0.16.0a9/docs/generated/sparse.GCXS.any.rst 0000664 0000000 0000000 00000000107 14634755015 0021603 0 ustar 00root root 0000000 0000000 GCXS.any
========
.. currentmodule:: sparse
.. automethod:: GCXS.any
sparse-0.16.0a9/docs/generated/sparse.GCXS.asformat.rst 0000664 0000000 0000000 00000000126 14634755015 0022631 0 ustar 00root root 0000000 0000000 GCXS.asformat
=============
.. currentmodule:: sparse
.. automethod:: GCXS.asformat
sparse-0.16.0a9/docs/generated/sparse.GCXS.astype.rst 0000664 0000000 0000000 00000000120 14634755015 0022314 0 ustar 00root root 0000000 0000000 GCXS.astype
===========
.. currentmodule:: sparse
.. automethod:: GCXS.astype
sparse-0.16.0a9/docs/generated/sparse.GCXS.change_compressed_axes.rst 0000664 0000000 0000000 00000000204 14634755015 0025503 0 ustar 00root root 0000000 0000000 GCXS.change\_compressed\_axes
=============================
.. currentmodule:: sparse
.. automethod:: GCXS.change_compressed_axes
sparse-0.16.0a9/docs/generated/sparse.GCXS.clip.rst 0000664 0000000 0000000 00000000112 14634755015 0021737 0 ustar 00root root 0000000 0000000 GCXS.clip
=========
.. currentmodule:: sparse
.. automethod:: GCXS.clip
sparse-0.16.0a9/docs/generated/sparse.GCXS.compressed_axes.rst 0000664 0000000 0000000 00000000157 14634755015 0024205 0 ustar 00root root 0000000 0000000 GCXS.compressed\_axes
=====================
.. currentmodule:: sparse
.. autoproperty:: GCXS.compressed_axes
sparse-0.16.0a9/docs/generated/sparse.GCXS.conj.rst 0000664 0000000 0000000 00000000112 14634755015 0021741 0 ustar 00root root 0000000 0000000 GCXS.conj
=========
.. currentmodule:: sparse
.. automethod:: GCXS.conj
sparse-0.16.0a9/docs/generated/sparse.GCXS.copy.rst 0000664 0000000 0000000 00000000112 14634755015 0021762 0 ustar 00root root 0000000 0000000 GCXS.copy
=========
.. currentmodule:: sparse
.. automethod:: GCXS.copy
sparse-0.16.0a9/docs/generated/sparse.GCXS.density.rst 0000664 0000000 0000000 00000000125 14634755015 0022473 0 ustar 00root root 0000000 0000000 GCXS.density
============
.. currentmodule:: sparse
.. autoproperty:: GCXS.density
sparse-0.16.0a9/docs/generated/sparse.GCXS.dot.rst 0000664 0000000 0000000 00000000107 14634755015 0021602 0 ustar 00root root 0000000 0000000 GCXS.dot
========
.. currentmodule:: sparse
.. automethod:: GCXS.dot
sparse-0.16.0a9/docs/generated/sparse.GCXS.dtype.rst 0000664 0000000 0000000 00000000117 14634755015 0022142 0 ustar 00root root 0000000 0000000 GCXS.dtype
==========
.. currentmodule:: sparse
.. autoproperty:: GCXS.dtype
sparse-0.16.0a9/docs/generated/sparse.GCXS.flatten.rst 0000664 0000000 0000000 00000000123 14634755015 0022447 0 ustar 00root root 0000000 0000000 GCXS.flatten
============
.. currentmodule:: sparse
.. automethod:: GCXS.flatten
sparse-0.16.0a9/docs/generated/sparse.GCXS.from_coo.rst 0000664 0000000 0000000 00000000130 14634755015 0022613 0 ustar 00root root 0000000 0000000 GCXS.from\_coo
==============
.. currentmodule:: sparse
.. automethod:: GCXS.from_coo
sparse-0.16.0a9/docs/generated/sparse.GCXS.from_iter.rst 0000664 0000000 0000000 00000000133 14634755015 0023001 0 ustar 00root root 0000000 0000000 GCXS.from\_iter
===============
.. currentmodule:: sparse
.. automethod:: GCXS.from_iter
sparse-0.16.0a9/docs/generated/sparse.GCXS.from_numpy.rst 0000664 0000000 0000000 00000000136 14634755015 0023211 0 ustar 00root root 0000000 0000000 GCXS.from\_numpy
================
.. currentmodule:: sparse
.. automethod:: GCXS.from_numpy
sparse-0.16.0a9/docs/generated/sparse.GCXS.from_scipy_sparse.rst 0000664 0000000 0000000 00000000165 14634755015 0024547 0 ustar 00root root 0000000 0000000 GCXS.from\_scipy\_sparse
========================
.. currentmodule:: sparse
.. automethod:: GCXS.from_scipy_sparse
sparse-0.16.0a9/docs/generated/sparse.GCXS.imag.rst 0000664 0000000 0000000 00000000114 14634755015 0021727 0 ustar 00root root 0000000 0000000 GCXS.imag
=========
.. currentmodule:: sparse
.. autoproperty:: GCXS.imag
sparse-0.16.0a9/docs/generated/sparse.GCXS.max.rst 0000664 0000000 0000000 00000000107 14634755015 0021601 0 ustar 00root root 0000000 0000000 GCXS.max
========
.. currentmodule:: sparse
.. automethod:: GCXS.max
sparse-0.16.0a9/docs/generated/sparse.GCXS.maybe_densify.rst 0000664 0000000 0000000 00000000147 14634755015 0023636 0 ustar 00root root 0000000 0000000 GCXS.maybe\_densify
===================
.. currentmodule:: sparse
.. automethod:: GCXS.maybe_densify
sparse-0.16.0a9/docs/generated/sparse.GCXS.mean.rst 0000664 0000000 0000000 00000000112 14634755015 0021730 0 ustar 00root root 0000000 0000000 GCXS.mean
=========
.. currentmodule:: sparse
.. automethod:: GCXS.mean
sparse-0.16.0a9/docs/generated/sparse.GCXS.min.rst 0000664 0000000 0000000 00000000107 14634755015 0021577 0 ustar 00root root 0000000 0000000 GCXS.min
========
.. currentmodule:: sparse
.. automethod:: GCXS.min
sparse-0.16.0a9/docs/generated/sparse.GCXS.nbytes.rst 0000664 0000000 0000000 00000000122 14634755015 0022315 0 ustar 00root root 0000000 0000000 GCXS.nbytes
===========
.. currentmodule:: sparse
.. autoproperty:: GCXS.nbytes
sparse-0.16.0a9/docs/generated/sparse.GCXS.ndim.rst 0000664 0000000 0000000 00000000114 14634755015 0021741 0 ustar 00root root 0000000 0000000 GCXS.ndim
=========
.. currentmodule:: sparse
.. autoproperty:: GCXS.ndim
sparse-0.16.0a9/docs/generated/sparse.GCXS.nnz.rst 0000664 0000000 0000000 00000000111 14634755015 0021614 0 ustar 00root root 0000000 0000000 GCXS.nnz
========
.. currentmodule:: sparse
.. autoproperty:: GCXS.nnz
sparse-0.16.0a9/docs/generated/sparse.GCXS.prod.rst 0000664 0000000 0000000 00000000112 14634755015 0021754 0 ustar 00root root 0000000 0000000 GCXS.prod
=========
.. currentmodule:: sparse
.. automethod:: GCXS.prod
sparse-0.16.0a9/docs/generated/sparse.GCXS.real.rst 0000664 0000000 0000000 00000000114 14634755015 0021735 0 ustar 00root root 0000000 0000000 GCXS.real
=========
.. currentmodule:: sparse
.. autoproperty:: GCXS.real
sparse-0.16.0a9/docs/generated/sparse.GCXS.reduce.rst 0000664 0000000 0000000 00000000120 14634755015 0022256 0 ustar 00root root 0000000 0000000 GCXS.reduce
===========
.. currentmodule:: sparse
.. automethod:: GCXS.reduce
sparse-0.16.0a9/docs/generated/sparse.GCXS.reshape.rst 0000664 0000000 0000000 00000000123 14634755015 0022441 0 ustar 00root root 0000000 0000000 GCXS.reshape
============
.. currentmodule:: sparse
.. automethod:: GCXS.reshape
sparse-0.16.0a9/docs/generated/sparse.GCXS.round.rst 0000664 0000000 0000000 00000000115 14634755015 0022142 0 ustar 00root root 0000000 0000000 GCXS.round
==========
.. currentmodule:: sparse
.. automethod:: GCXS.round
sparse-0.16.0a9/docs/generated/sparse.GCXS.round_.rst 0000664 0000000 0000000 00000000122 14634755015 0022277 0 ustar 00root root 0000000 0000000 GCXS.round\_
============
.. currentmodule:: sparse
.. automethod:: GCXS.round_
sparse-0.16.0a9/docs/generated/sparse.GCXS.rst 0000664 0000000 0000000 00000002016 14634755015 0021016 0 ustar 00root root 0000000 0000000 GCXS
====
.. currentmodule:: sparse
.. autoclass:: GCXS
.. rubric:: Attributes
.. autosummary::
:toctree:
GCXS.T
GCXS.compressed_axes
GCXS.density
GCXS.dtype
GCXS.imag
GCXS.nbytes
GCXS.ndim
GCXS.nnz
GCXS.real
GCXS.size
.. rubric:: Methods
.. autosummary::
:toctree:
GCXS.__init__
GCXS.all
GCXS.amax
GCXS.amin
GCXS.any
GCXS.asformat
GCXS.astype
GCXS.change_compressed_axes
GCXS.clip
GCXS.conj
GCXS.copy
GCXS.dot
GCXS.flatten
GCXS.from_coo
GCXS.from_iter
GCXS.from_numpy
GCXS.from_scipy_sparse
GCXS.max
GCXS.maybe_densify
GCXS.mean
GCXS.min
GCXS.prod
GCXS.reduce
GCXS.reshape
GCXS.round
GCXS.round_
GCXS.std
GCXS.sum
GCXS.to_scipy_sparse
GCXS.tocoo
GCXS.todense
GCXS.todok
GCXS.transpose
GCXS.var
sparse-0.16.0a9/docs/generated/sparse.GCXS.size.rst 0000664 0000000 0000000 00000000114 14634755015 0021764 0 ustar 00root root 0000000 0000000 GCXS.size
=========
.. currentmodule:: sparse
.. autoproperty:: GCXS.size
sparse-0.16.0a9/docs/generated/sparse.GCXS.std.rst 0000664 0000000 0000000 00000000107 14634755015 0021606 0 ustar 00root root 0000000 0000000 GCXS.std
========
.. currentmodule:: sparse
.. automethod:: GCXS.std
sparse-0.16.0a9/docs/generated/sparse.GCXS.sum.rst 0000664 0000000 0000000 00000000107 14634755015 0021620 0 ustar 00root root 0000000 0000000 GCXS.sum
========
.. currentmodule:: sparse
.. automethod:: GCXS.sum
sparse-0.16.0a9/docs/generated/sparse.GCXS.to_scipy_sparse.rst 0000664 0000000 0000000 00000000157 14634755015 0024227 0 ustar 00root root 0000000 0000000 GCXS.to\_scipy\_sparse
======================
.. currentmodule:: sparse
.. automethod:: GCXS.to_scipy_sparse
sparse-0.16.0a9/docs/generated/sparse.GCXS.tocoo.rst 0000664 0000000 0000000 00000000115 14634755015 0022136 0 ustar 00root root 0000000 0000000 GCXS.tocoo
==========
.. currentmodule:: sparse
.. automethod:: GCXS.tocoo
sparse-0.16.0a9/docs/generated/sparse.GCXS.todense.rst 0000664 0000000 0000000 00000000123 14634755015 0022453 0 ustar 00root root 0000000 0000000 GCXS.todense
============
.. currentmodule:: sparse
.. automethod:: GCXS.todense
sparse-0.16.0a9/docs/generated/sparse.GCXS.todok.rst 0000664 0000000 0000000 00000000115 14634755015 0022133 0 ustar 00root root 0000000 0000000 GCXS.todok
==========
.. currentmodule:: sparse
.. automethod:: GCXS.todok
sparse-0.16.0a9/docs/generated/sparse.GCXS.transpose.rst 0000664 0000000 0000000 00000000131 14634755015 0023027 0 ustar 00root root 0000000 0000000 GCXS.transpose
==============
.. currentmodule:: sparse
.. automethod:: GCXS.transpose
sparse-0.16.0a9/docs/generated/sparse.GCXS.var.rst 0000664 0000000 0000000 00000000107 14634755015 0021604 0 ustar 00root root 0000000 0000000 GCXS.var
========
.. currentmodule:: sparse
.. automethod:: GCXS.var
sparse-0.16.0a9/docs/generated/sparse.SparseArray.asformat.rst 0000664 0000000 0000000 00000000153 14634755015 0024321 0 ustar 00root root 0000000 0000000 SparseArray.asformat
====================
.. currentmodule:: sparse
.. automethod:: SparseArray.asformat
sparse-0.16.0a9/docs/generated/sparse.SparseArray.density.rst 0000664 0000000 0000000 00000000155 14634755015 0024166 0 ustar 00root root 0000000 0000000 SparseArray\.density
====================
.. currentmodule:: sparse
.. autoattribute:: SparseArray.density
sparse-0.16.0a9/docs/generated/sparse.SparseArray.ndim.rst 0000664 0000000 0000000 00000000144 14634755015 0023434 0 ustar 00root root 0000000 0000000 SparseArray\.ndim
=================
.. currentmodule:: sparse
.. autoattribute:: SparseArray.ndim
sparse-0.16.0a9/docs/generated/sparse.SparseArray.nnz.rst 0000664 0000000 0000000 00000000141 14634755015 0023307 0 ustar 00root root 0000000 0000000 SparseArray\.nnz
================
.. currentmodule:: sparse
.. autoattribute:: SparseArray.nnz
sparse-0.16.0a9/docs/generated/sparse.SparseArray.rst 0000664 0000000 0000000 00000000537 14634755015 0022514 0 ustar 00root root 0000000 0000000 SparseArray
===========
.. currentmodule:: sparse
.. autoclass:: SparseArray
.. rubric:: Attributes
.. autosummary::
:toctree:
SparseArray.density
SparseArray.ndim
SparseArray.nnz
SparseArray.size
.. rubric:: Methods
.. autosummary::
:toctree:
SparseArray.asformat
SparseArray.todense
sparse-0.16.0a9/docs/generated/sparse.SparseArray.size.rst 0000664 0000000 0000000 00000000144 14634755015 0023457 0 ustar 00root root 0000000 0000000 SparseArray\.size
=================
.. currentmodule:: sparse
.. autoattribute:: SparseArray.size
sparse-0.16.0a9/docs/generated/sparse.SparseArray.todense.rst 0000664 0000000 0000000 00000000150 14634755015 0024143 0 ustar 00root root 0000000 0000000 SparseArray.todense
===================
.. currentmodule:: sparse
.. automethod:: SparseArray.todense
sparse-0.16.0a9/docs/generated/sparse.abs.rst 0000664 0000000 0000000 00000000072 14634755015 0021017 0 ustar 00root root 0000000 0000000 abs
===
.. currentmodule:: sparse
.. autofunction:: abs
sparse-0.16.0a9/docs/generated/sparse.all.rst 0000664 0000000 0000000 00000000072 14634755015 0021022 0 ustar 00root root 0000000 0000000 all
===
.. currentmodule:: sparse
.. autofunction:: all
sparse-0.16.0a9/docs/generated/sparse.any.rst 0000664 0000000 0000000 00000000072 14634755015 0021041 0 ustar 00root root 0000000 0000000 any
===
.. currentmodule:: sparse
.. autofunction:: any
sparse-0.16.0a9/docs/generated/sparse.argmax.rst 0000664 0000000 0000000 00000000103 14634755015 0021524 0 ustar 00root root 0000000 0000000 argmax
======
.. currentmodule:: sparse
.. autofunction:: argmax
sparse-0.16.0a9/docs/generated/sparse.argmin.rst 0000664 0000000 0000000 00000000103 14634755015 0021522 0 ustar 00root root 0000000 0000000 argmin
======
.. currentmodule:: sparse
.. autofunction:: argmin
sparse-0.16.0a9/docs/generated/sparse.argwhere.rst 0000664 0000000 0000000 00000000111 14634755015 0022050 0 ustar 00root root 0000000 0000000 argwhere
========
.. currentmodule:: sparse
.. autofunction:: argwhere
sparse-0.16.0a9/docs/generated/sparse.asCOO.rst 0000664 0000000 0000000 00000000100 14634755015 0021206 0 ustar 00root root 0000000 0000000 asCOO
=====
.. currentmodule:: sparse
.. autofunction:: asCOO
sparse-0.16.0a9/docs/generated/sparse.as_coo.rst 0000664 0000000 0000000 00000000105 14634755015 0021512 0 ustar 00root root 0000000 0000000 as\_coo
=======
.. currentmodule:: sparse
.. autofunction:: as_coo
sparse-0.16.0a9/docs/generated/sparse.asarray.rst 0000664 0000000 0000000 00000000106 14634755015 0021712 0 ustar 00root root 0000000 0000000 asarray
=======
.. currentmodule:: sparse
.. autofunction:: asarray
sparse-0.16.0a9/docs/generated/sparse.asnumpy.rst 0000664 0000000 0000000 00000000106 14634755015 0021744 0 ustar 00root root 0000000 0000000 asnumpy
=======
.. currentmodule:: sparse
.. autofunction:: asnumpy
sparse-0.16.0a9/docs/generated/sparse.astype.rst 0000664 0000000 0000000 00000000103 14634755015 0021552 0 ustar 00root root 0000000 0000000 astype
======
.. currentmodule:: sparse
.. autofunction:: astype
sparse-0.16.0a9/docs/generated/sparse.broadcast_arrays.rst 0000664 0000000 0000000 00000000143 14634755015 0023574 0 ustar 00root root 0000000 0000000 broadcast\_arrays
=================
.. currentmodule:: sparse
.. autofunction:: broadcast_arrays
sparse-0.16.0a9/docs/generated/sparse.broadcast_to.rst 0000664 0000000 0000000 00000000127 14634755015 0022717 0 ustar 00root root 0000000 0000000 broadcast\_to
=============
.. currentmodule:: sparse
.. autofunction:: broadcast_to
sparse-0.16.0a9/docs/generated/sparse.clip.rst 0000664 0000000 0000000 00000000075 14634755015 0021204 0 ustar 00root root 0000000 0000000 clip
====
.. currentmodule:: sparse
.. autofunction:: clip
sparse-0.16.0a9/docs/generated/sparse.concat.rst 0000664 0000000 0000000 00000000103 14634755015 0021514 0 ustar 00root root 0000000 0000000 concat
======
.. currentmodule:: sparse
.. autofunction:: concat
sparse-0.16.0a9/docs/generated/sparse.concatenate.rst 0000664 0000000 0000000 00000000122 14634755015 0022532 0 ustar 00root root 0000000 0000000 concatenate
===========
.. currentmodule:: sparse
.. autofunction:: concatenate
sparse-0.16.0a9/docs/generated/sparse.diagonal.rst 0000664 0000000 0000000 00000000116 14634755015 0022027 0 ustar 00root root 0000000 0000000 diagonal
=============
.. currentmodule:: sparse
.. autofunction:: diagonal
sparse-0.16.0a9/docs/generated/sparse.diagonalize.rst 0000664 0000000 0000000 00000000122 14634755015 0022534 0 ustar 00root root 0000000 0000000 diagonalize
===========
.. currentmodule:: sparse
.. autofunction:: diagonalize
sparse-0.16.0a9/docs/generated/sparse.dot.rst 0000664 0000000 0000000 00000000072 14634755015 0021040 0 ustar 00root root 0000000 0000000 dot
===
.. currentmodule:: sparse
.. autofunction:: dot
sparse-0.16.0a9/docs/generated/sparse.einsum.rst 0000664 0000000 0000000 00000000103 14634755015 0021545 0 ustar 00root root 0000000 0000000 einsum
======
.. currentmodule:: sparse
.. autofunction:: einsum
sparse-0.16.0a9/docs/generated/sparse.elemwise.rst 0000664 0000000 0000000 00000000111 14634755015 0022056 0 ustar 00root root 0000000 0000000 elemwise
========
.. currentmodule:: sparse
.. autofunction:: elemwise
sparse-0.16.0a9/docs/generated/sparse.empty.rst 0000664 0000000 0000000 00000000100 14634755015 0021400 0 ustar 00root root 0000000 0000000 empty
=====
.. currentmodule:: sparse
.. autofunction:: empty
sparse-0.16.0a9/docs/generated/sparse.empty_like.rst 0000664 0000000 0000000 00000000121 14634755015 0022407 0 ustar 00root root 0000000 0000000 empty\_like
===========
.. currentmodule:: sparse
.. autofunction:: empty_like
sparse-0.16.0a9/docs/generated/sparse.equal.rst 0000664 0000000 0000000 00000000100 14634755015 0021351 0 ustar 00root root 0000000 0000000 equal
=====
.. currentmodule:: sparse
.. autofunction:: equal
sparse-0.16.0a9/docs/generated/sparse.expand_dims.rst 0000664 0000000 0000000 00000000124 14634755015 0022543 0 ustar 00root root 0000000 0000000 expand\_dims
============
.. currentmodule:: sparse
.. autofunction:: expand_dims
sparse-0.16.0a9/docs/generated/sparse.eye.rst 0000664 0000000 0000000 00000000072 14634755015 0021034 0 ustar 00root root 0000000 0000000 eye
===
.. currentmodule:: sparse
.. autofunction:: eye
sparse-0.16.0a9/docs/generated/sparse.flip.rst 0000664 0000000 0000000 00000000075 14634755015 0021207 0 ustar 00root root 0000000 0000000 flip
====
.. currentmodule:: sparse
.. autofunction:: flip
sparse-0.16.0a9/docs/generated/sparse.full.rst 0000664 0000000 0000000 00000000075 14634755015 0021217 0 ustar 00root root 0000000 0000000 full
====
.. currentmodule:: sparse
.. autofunction:: full
sparse-0.16.0a9/docs/generated/sparse.full_like.rst 0000664 0000000 0000000 00000000114 14634755015 0022215 0 ustar 00root root 0000000 0000000 full_like
=========
.. currentmodule:: sparse
.. autofunction:: full_like
sparse-0.16.0a9/docs/generated/sparse.isinf.rst 0000664 0000000 0000000 00000000100 14634755015 0021352 0 ustar 00root root 0000000 0000000 isinf
=====
.. currentmodule:: sparse
.. autofunction:: isinf
sparse-0.16.0a9/docs/generated/sparse.isnan.rst 0000664 0000000 0000000 00000000100 14634755015 0021352 0 ustar 00root root 0000000 0000000 isnan
=====
.. currentmodule:: sparse
.. autofunction:: isnan
sparse-0.16.0a9/docs/generated/sparse.isneginf.rst 0000664 0000000 0000000 00000000111 14634755015 0022046 0 ustar 00root root 0000000 0000000 isneginf
========
.. currentmodule:: sparse
.. autofunction:: isneginf
sparse-0.16.0a9/docs/generated/sparse.isposinf.rst 0000664 0000000 0000000 00000000111 14634755015 0022076 0 ustar 00root root 0000000 0000000 isposinf
========
.. currentmodule:: sparse
.. autofunction:: isposinf
sparse-0.16.0a9/docs/generated/sparse.kron.rst 0000664 0000000 0000000 00000000075 14634755015 0021226 0 ustar 00root root 0000000 0000000 kron
====
.. currentmodule:: sparse
.. autofunction:: kron
sparse-0.16.0a9/docs/generated/sparse.load_npz.rst 0000664 0000000 0000000 00000000113 14634755015 0022054 0 ustar 00root root 0000000 0000000 load\_npz
=========
.. currentmodule:: sparse
.. autofunction:: load_npz
sparse-0.16.0a9/docs/generated/sparse.matmul.rst 0000664 0000000 0000000 00000000103 14634755015 0021544 0 ustar 00root root 0000000 0000000 matmul
======
.. currentmodule:: sparse
.. autofunction:: matmul
sparse-0.16.0a9/docs/generated/sparse.matrix_transpose.rst 0000664 0000000 0000000 00000000143 14634755015 0023653 0 ustar 00root root 0000000 0000000 matrix\_transpose
=================
.. currentmodule:: sparse
.. autofunction:: matrix_transpose
sparse-0.16.0a9/docs/generated/sparse.max.rst 0000664 0000000 0000000 00000000072 14634755015 0021037 0 ustar 00root root 0000000 0000000 max
===
.. currentmodule:: sparse
.. autofunction:: max
sparse-0.16.0a9/docs/generated/sparse.mean.rst 0000664 0000000 0000000 00000000075 14634755015 0021175 0 ustar 00root root 0000000 0000000 mean
====
.. currentmodule:: sparse
.. autofunction:: mean
sparse-0.16.0a9/docs/generated/sparse.min.rst 0000664 0000000 0000000 00000000072 14634755015 0021035 0 ustar 00root root 0000000 0000000 min
===
.. currentmodule:: sparse
.. autofunction:: min
sparse-0.16.0a9/docs/generated/sparse.moveaxis.rst 0000664 0000000 0000000 00000000111 14634755015 0022077 0 ustar 00root root 0000000 0000000 moveaxis
========
.. currentmodule:: sparse
.. autofunction:: moveaxis
sparse-0.16.0a9/docs/generated/sparse.nanmax.rst 0000664 0000000 0000000 00000000103 14634755015 0021527 0 ustar 00root root 0000000 0000000 nanmax
======
.. currentmodule:: sparse
.. autofunction:: nanmax
sparse-0.16.0a9/docs/generated/sparse.nanmean.rst 0000664 0000000 0000000 00000000106 14634755015 0021665 0 ustar 00root root 0000000 0000000 nanmean
=======
.. currentmodule:: sparse
.. autofunction:: nanmean
sparse-0.16.0a9/docs/generated/sparse.nanmin.rst 0000664 0000000 0000000 00000000103 14634755015 0021525 0 ustar 00root root 0000000 0000000 nanmin
======
.. currentmodule:: sparse
.. autofunction:: nanmin
sparse-0.16.0a9/docs/generated/sparse.nanprod.rst 0000664 0000000 0000000 00000000106 14634755015 0021711 0 ustar 00root root 0000000 0000000 nanprod
=======
.. currentmodule:: sparse
.. autofunction:: nanprod
sparse-0.16.0a9/docs/generated/sparse.nanreduce.rst 0000664 0000000 0000000 00000000114 14634755015 0022213 0 ustar 00root root 0000000 0000000 nanreduce
=========
.. currentmodule:: sparse
.. autofunction:: nanreduce
sparse-0.16.0a9/docs/generated/sparse.nansum.rst 0000664 0000000 0000000 00000000103 14634755015 0021546 0 ustar 00root root 0000000 0000000 nansum
======
.. currentmodule:: sparse
.. autofunction:: nansum
sparse-0.16.0a9/docs/generated/sparse.nonzero.rst 0000664 0000000 0000000 00000000106 14634755015 0021742 0 ustar 00root root 0000000 0000000 nonzero
=======
.. currentmodule:: sparse
.. autofunction:: nonzero
sparse-0.16.0a9/docs/generated/sparse.ones.rst 0000664 0000000 0000000 00000000075 14634755015 0021221 0 ustar 00root root 0000000 0000000 ones
====
.. currentmodule:: sparse
.. autofunction:: ones
sparse-0.16.0a9/docs/generated/sparse.ones_like.rst 0000664 0000000 0000000 00000000114 14634755015 0022217 0 ustar 00root root 0000000 0000000 ones_like
=========
.. currentmodule:: sparse
.. autofunction:: ones_like
sparse-0.16.0a9/docs/generated/sparse.outer.rst 0000664 0000000 0000000 00000000100 14634755015 0021400 0 ustar 00root root 0000000 0000000 outer
=====
.. currentmodule:: sparse
.. autofunction:: outer
sparse-0.16.0a9/docs/generated/sparse.pad.rst 0000664 0000000 0000000 00000000072 14634755015 0021016 0 ustar 00root root 0000000 0000000 pad
===
.. currentmodule:: sparse
.. autofunction:: pad
sparse-0.16.0a9/docs/generated/sparse.permute_dims.rst 0000664 0000000 0000000 00000000127 14634755015 0022750 0 ustar 00root root 0000000 0000000 permute\_dims
=============
.. currentmodule:: sparse
.. autofunction:: permute_dims
sparse-0.16.0a9/docs/generated/sparse.prod.rst 0000664 0000000 0000000 00000000075 14634755015 0021221 0 ustar 00root root 0000000 0000000 prod
====
.. currentmodule:: sparse
.. autofunction:: prod
sparse-0.16.0a9/docs/generated/sparse.random.rst 0000664 0000000 0000000 00000000103 14634755015 0021525 0 ustar 00root root 0000000 0000000 random
======
.. currentmodule:: sparse
.. autofunction:: random
sparse-0.16.0a9/docs/generated/sparse.reshape.rst 0000664 0000000 0000000 00000000106 14634755015 0021677 0 ustar 00root root 0000000 0000000 reshape
=======
.. currentmodule:: sparse
.. autofunction:: reshape
sparse-0.16.0a9/docs/generated/sparse.result_type.rst 0000664 0000000 0000000 00000000122 14634755015 0022625 0 ustar 00root root 0000000 0000000 result_type
===========
.. currentmodule:: sparse
.. autofunction:: result_type
sparse-0.16.0a9/docs/generated/sparse.roll.rst 0000664 0000000 0000000 00000000075 14634755015 0021225 0 ustar 00root root 0000000 0000000 roll
====
.. currentmodule:: sparse
.. autofunction:: roll
sparse-0.16.0a9/docs/generated/sparse.round.rst 0000664 0000000 0000000 00000000100 14634755015 0021371 0 ustar 00root root 0000000 0000000 round
=====
.. currentmodule:: sparse
.. autofunction:: round
sparse-0.16.0a9/docs/generated/sparse.rst 0000664 0000000 0000000 00000002262 14634755015 0020256 0 ustar 00root root 0000000 0000000 API
===
.. rubric:: Description
.. automodule:: sparse
.. currentmodule:: sparse
.. rubric:: Classes
.. autosummary::
:toctree:
COO
DOK
GCXS
SparseArray
.. rubric:: Functions
.. autosummary::
:toctree:
abs
all
any
argmax
argmin
argwhere
asCOO
as_coo
asarray
asnumpy
astype
broadcast_arrays
broadcast_to
clip
concat
concatenate
diagonal
diagonalize
dot
einsum
elemwise
empty
empty_like
equal
expand_dims
eye
flip
full
full_like
isinf
isnan
isneginf
isposinf
kron
load_npz
matmul
matrix_transpose
max
mean
min
moveaxis
moveaxis
nanmax
nanmean
nanmin
nanprod
nanreduce
nansum
nonzero
ones
ones_like
outer
pad
permute_dims
prod
random
reshape
result_type
roll
round
save_npz
sort
squeeze
stack
std
sum
take
tensordot
tril
triu
unique_counts
unique_values
var
vecdot
where
zeros
zeros_like
sparse-0.16.0a9/docs/generated/sparse.save_npz.rst 0000664 0000000 0000000 00000000113 14634755015 0022073 0 ustar 00root root 0000000 0000000 save\_npz
=========
.. currentmodule:: sparse
.. autofunction:: save_npz
sparse-0.16.0a9/docs/generated/sparse.sort.rst 0000664 0000000 0000000 00000000075 14634755015 0021244 0 ustar 00root root 0000000 0000000 sort
====
.. currentmodule:: sparse
.. autofunction:: sort
sparse-0.16.0a9/docs/generated/sparse.squeeze.rst 0000664 0000000 0000000 00000000106 14634755015 0021731 0 ustar 00root root 0000000 0000000 squeeze
=======
.. currentmodule:: sparse
.. autofunction:: squeeze
sparse-0.16.0a9/docs/generated/sparse.stack.rst 0000664 0000000 0000000 00000000100 14634755015 0021347 0 ustar 00root root 0000000 0000000 stack
=====
.. currentmodule:: sparse
.. autofunction:: stack
sparse-0.16.0a9/docs/generated/sparse.std.rst 0000664 0000000 0000000 00000000072 14634755015 0021044 0 ustar 00root root 0000000 0000000 std
===
.. currentmodule:: sparse
.. autofunction:: std
sparse-0.16.0a9/docs/generated/sparse.sum.rst 0000664 0000000 0000000 00000000072 14634755015 0021056 0 ustar 00root root 0000000 0000000 sum
===
.. currentmodule:: sparse
.. autofunction:: sum
sparse-0.16.0a9/docs/generated/sparse.take.rst 0000664 0000000 0000000 00000000075 14634755015 0021201 0 ustar 00root root 0000000 0000000 take
====
.. currentmodule:: sparse
.. autofunction:: take
sparse-0.16.0a9/docs/generated/sparse.tensordot.rst 0000664 0000000 0000000 00000000114 14634755015 0022270 0 ustar 00root root 0000000 0000000 tensordot
=========
.. currentmodule:: sparse
.. autofunction:: tensordot
sparse-0.16.0a9/docs/generated/sparse.tril.rst 0000664 0000000 0000000 00000000075 14634755015 0021227 0 ustar 00root root 0000000 0000000 tril
====
.. currentmodule:: sparse
.. autofunction:: tril
sparse-0.16.0a9/docs/generated/sparse.triu.rst 0000664 0000000 0000000 00000000075 14634755015 0021240 0 ustar 00root root 0000000 0000000 triu
====
.. currentmodule:: sparse
.. autofunction:: triu
sparse-0.16.0a9/docs/generated/sparse.unique_counts.rst 0000664 0000000 0000000 00000000132 14634755015 0023150 0 ustar 00root root 0000000 0000000 unique\_counts
==============
.. currentmodule:: sparse
.. autofunction:: unique_counts
sparse-0.16.0a9/docs/generated/sparse.unique_values.rst 0000664 0000000 0000000 00000000132 14634755015 0023134 0 ustar 00root root 0000000 0000000 unique\_values
==============
.. currentmodule:: sparse
.. autofunction:: unique_values
sparse-0.16.0a9/docs/generated/sparse.var.rst 0000664 0000000 0000000 00000000072 14634755015 0021042 0 ustar 00root root 0000000 0000000 var
===
.. currentmodule:: sparse
.. autofunction:: var
sparse-0.16.0a9/docs/generated/sparse.vecdot.rst 0000664 0000000 0000000 00000000103 14634755015 0021531 0 ustar 00root root 0000000 0000000 vecdot
======
.. currentmodule:: sparse
.. autofunction:: vecdot
sparse-0.16.0a9/docs/generated/sparse.where.rst 0000664 0000000 0000000 00000000100 14634755015 0021354 0 ustar 00root root 0000000 0000000 where
=====
.. currentmodule:: sparse
.. autofunction:: where
sparse-0.16.0a9/docs/generated/sparse.zeros.rst 0000664 0000000 0000000 00000000100 14634755015 0021404 0 ustar 00root root 0000000 0000000 zeros
=====
.. currentmodule:: sparse
.. autofunction:: zeros
sparse-0.16.0a9/docs/generated/sparse.zeros_like.rst 0000664 0000000 0000000 00000000117 14634755015 0022420 0 ustar 00root root 0000000 0000000 zeros_like
==========
.. currentmodule:: sparse
.. autofunction:: zeros_like
sparse-0.16.0a9/docs/index.rst 0000664 0000000 0000000 00000010004 14634755015 0016123 0 ustar 00root root 0000000 0000000 Sparse
======
.. raw:: html
:file: logo.svg
This implements sparse arrays of arbitrary dimension on top of :obj:`numpy` and :obj:`scipy.sparse`.
It generalizes the :obj:`scipy.sparse.coo_matrix` and :obj:`scipy.sparse.dok_matrix` layouts,
but extends beyond just rows and columns to an arbitrary number of dimensions.
Additionally, this project maintains compatibility with the :obj:`numpy.ndarray` interface
rather than the :obj:`numpy.matrix` interface used in :obj:`scipy.sparse`
These differences make this project useful in certain situations
where scipy.sparse matrices are not well suited,
but it should not be considered a full replacement.
The data structures in pydata/sparse complement and can
be used in conjunction with the fast linear algebra routines
inside scipy.sparse. A format conversion or copy may be required.
Motivation
----------
Sparse arrays, or arrays that are mostly empty or filled with zeros,
are common in many scientific applications.
To save space we often avoid storing these arrays in traditional dense formats,
and instead choose different data structures.
Our choice of data structure can significantly affect our storage and computational
costs when working with these arrays.
Design
------
The main data structure in this library follows the
`Coordinate List (COO) `_
layout for sparse matrices, but extends it to multiple dimensions.
The COO layout, which stores the row index, column index, and value of every element:
=== === ====
row col data
=== === ====
0 0 10
0 2 13
1 3 9
3 8 21
=== === ====
It is straightforward to extend the COO layout to an arbitrary number of
dimensions:
==== ==== ==== === ====
dim1 dim2 dim3 ... data
==== ==== ==== === ====
0 0 0 . 10
0 0 3 . 13
0 2 2 . 9
3 1 4 . 21
==== ==== ==== === ====
This makes it easy to *store* a multidimensional sparse array, but we still
need to reimplement all of the array operations like transpose, reshape,
slicing, tensordot, reductions, etc., which can be challenging in general.
This library also includes several other data structures. Similar to COO,
the `Dictionary of Keys (DOK) `_
format for sparse matrices generalizes well to an arbitrary number of dimensions.
DOK is well-suited for writing and mutating. Most other operations are not supported for DOK.
A common workflow may involve writing an array with DOK and then converting to another
format for other operations.
The `Compressed Sparse Row/Column (CSR/CSC) `_
formats are widely used in scientific computing are now supported
by pydata/sparse. The CSR/CSC formats excel at compression and mathematical operations.
While these formats are restricted to two dimensions, pydata/sparse supports
the GCXS sparse array format, based on
`GCRS/GCCS from `_
which generalizes CSR/CSC to n-dimensional arrays.
Like their two-dimensional CSR/CSC counterparts, GCXS arrays compress well.
Whereas the storage cost of COO depends heavily on the number of dimensions of the array,
the number of dimensions only minimally affects the storage cost of GCXS arrays,
which results in favorable compression ratios across many use cases.
Together these formats cover a wide array of applications of sparsity.
Additionally, with each format complying with the :obj:`numpy.ndarray` interface and
following the appropriate dispatching protocols,
pydata/sparse arrays can interact with other array libraries and seamlessly
take part in pydata-ecosystem-based workflows.
LICENSE
-------
This library is licensed under BSD-3
.. toctree::
:maxdepth: 3
:hidden:
install
quickstart
construct
operations
generated/sparse
roadmap
contributing
changelog
conduct
.. _scipy.sparse: https://docs.scipy.org/doc/scipy/reference/sparse.html
sparse-0.16.0a9/docs/install.rst 0000664 0000000 0000000 00000000763 14634755015 0016475 0 ustar 00root root 0000000 0000000 .. currentmodule:: sparse
Install
=======
You can install this library with ``pip``:
.. code-block:: bash
pip install sparse
You can also install from source from GitHub, either by pip installing
directly::
pip install git+https://github.com/pydata/sparse
Or by cloning the repository and installing locally::
git clone https://github.com/pydata/sparse.git
cd sparse/
pip install .
Note that this library is under active development and so some API churn should
be expected.
sparse-0.16.0a9/docs/logo.png 0000664 0000000 0000000 00000672445 14634755015 0015757 0 ustar 00root root 0000000 0000000 ‰PNG
IHDR ¤ ¤ ]#ÒÐ pHYs ÒÝ~ü tEXtSoftware Celsys Studio ToolÁ§á| IDATxÚìÝy|wa÷ñÏofö”dË÷}ß±ã8NìØ‰ÏĹI8
”¶´
”»¨ZèC®–(NG”¤O
-<BÈ}X¾ÇNÛñ}HŽïS²¤½æzþXI¶›\öXã|ßJ«Ý™ýÍj~ûyÍþÖ„aˆˆˆˆˆˆˆˆˆHTŒ‚”ˆˆˆˆˆˆˆˆDIAJDDDDDDDD"¥ %""""""""‘R‘H)H‰ˆˆˆˆˆˆˆH¤¤DDDDDDDD$R
R""""""""))‰”‚”ˆˆˆˆˆˆˆˆDJAJDDDDDDDD"¥ %""""""""‘R‘H)H‰ˆˆˆˆˆˆˆH¤¤DDDDDDDD$R
R""""""""))‰”‚”ˆˆˆHDŽ÷êÆÐx-¬…Õ5uzFDDDäíJAJDDD$"Çﺺ<ñ
h0Æ«®Yr¯žy;R‰HGj§0%"""oS
R""""yUjÐ`Œ[S]³ô·z–DDDäí@AJDDD$"gRíSª®YV§gKDDD.d
R""""yÍ ÕNaJDDD.p
R""""yÝAª]Àbc‚šêšºµzöDDDäB¢ %"""‘7¤Úþ}ƘÚꚺz=‹"""r!P‰È›Rí¦DDDä¡ %"""‘·¤Ú•ÃTMuM]£žU‰#)‘ˆœµ Ðo¡…µPaJDDDâFAJDDD$"g5HµS˜‘R‰È9 R회ñj«k–,Ô3-"""]‚”ˆˆˆHDÎijÐЦîÕ3."""]•‚”ˆˆˆHD" Rí¦DDD¤S‰H¤Aª]@ƒ1¥Ûªk–ÕiDDD¤«P‰Èy RíSªU˜‘®@AJDDD$"ç5HµS˜‘.@AJDDD$"]"HµXlLp[uM]½FFDDD¢¦ %"""‘.¤Úþ}ƘZ…)‰’‚”ˆˆˆHDºdj§0%"""R‰H—Ríÿ®¶0Õ¨‘sEAJDDD$"±R M¡ñZX¦DDDä\P‰Hl‚T;…)9G¤DDDD"» Õ. ɯ¦ºfɽE9¤DDDD"Û `ÙT\ó¹†äøµXö½My+¤DDDD"ç eœÙŸ#9fXvƒ»kEmbÄ•÷jTEDDäMÍ-¤DDDD¢ë •Ì’]ðy’£gƒ±p·/%·è{/†ûjªk–ÕitEDDä
Í-¤DDDD¢ë •®¢âÚ¿#1b&‹Ò–§É/ùAî,6¦T«0%"""¯{n¡ %"""8)+ÛƒìµObØåå µñQrËþ0Ê—ï)L‰ˆˆÈë¤ %"""‘X©Ê>d¯ý;C¦‚1×?H~ÅO '^}ãÀÀSS]SW¯Q‘ÓQ‰H¬ƒT·T\ûyœA—€âÚÿ!ÿÌ}„Å–3ÿQàßgŒ©U˜‘WR‰Hœƒ”Ýc0Ù‡3`"Rxþ—VÝOXʽö+L‰ˆˆÈ+(H‰ˆˆˆD$ÖAª×²>‡Óo<„…çî§°æ—„nþußGzwZX«kêu4ˆˆˆ¼½)H‰ˆˆˆD$ÖAªï*®ùvŸÑøäŸùŵÿCèߨ4…Æ[¨0%""òö¦ %"""‘8)gÀEd¯þì^# ýù?¡´þ÷o
¾ûÖî8 Á¯¶ºfɽ:BDDDÞ>¤DDDD"ç •6ÌÜOcW"tóäßCiË“à{gç¦DDDÞV¤DDDD"ë 5ò*²s>…Õ?a±…\Ý]”¶-À;»¤0%""ò¶ %"""‘8©äØùdf}«²/a¡‰Ö§¿‹»sþ¹yÀ€ÅÆ”j«k–Õéȹð(H‰ˆˆˆD$ÖAê¢ÈÌü0VE/‚Ü1rO}·~„Á¹}`…)‘’‚”ˆˆˆHDâ¤R“ßIúŠ?ÇÊT´¡õ‰ÿƒ·çˆj.©0%""rAQ‰HœƒTzêûH_þ§˜T%Aó!Zÿg¼}ë£ßÀ¿ÏS[]SW¯#JDD$¾¤DDDD"ß eHOÿ3ÒS߇Idñ›ö‘{ìx·œ¿MR˜‰5)‘ˆÄ6H‹ÌŒÛH]ònL"|7~ÿÈÎó¿må0US]Sר#LDD$FÓ)‘hÄ6HY™«>Bêâ[0vÿh=|ÿøË]cûšBã-´°*L‰ˆˆÄƒ‚”ˆˆˆHDb¤ìÙÙŸ$9ñFŒeãÞAëÃwœ8е¶SaJDD$6¤DDDD"× eœ™¹·“špƒw`s9HµíšÜ¦zÖ,©ÕQ'""ÒEç
R""""шmJdÈ^]CrÌ| ¼ýhy¨–°p¢kox@ƒ1^muÍ’{uô‰ˆˆt±ù…‚”ˆˆˆH4b¤’Y²>OrÔU†¸{_¤õ¡ZÂR.; 0%""Òõæ
R""""шmJUQqÝß“1ƒ0ððv¯¡õ¡; ýR¼v$ Á·¦ºféou4Šˆˆœçù…‚”ˆˆˆH4b¤2Ý©¸þ‹$†]Nè»x»ž¥å¡Z ¦óÈ€ÅNŸ!µU¼¯NG¥ˆˆÈyš_(H‰ˆˆˆD#®AÊÊö âÆÿ3x
¡_ÂݱŒÖG¾ë±pú£â_[lUöªêttŠˆˆDKAJDDD$"±
R½¨¸éqN"ôЏÛÓúø?Çy
Œ3h•7݉ÉV´]\|þ—5™ÙŸ\«£TDD$¢³±‚”ˆˆˆH4b¤*ûPqó8ýǺJ[ž"÷Ôwb<6$†L¥âÆ/cÒU-‡)¬þÅ~}Ÿ1¦¶º¦®^G«ˆˆÈ9>+H‰ˆˆˆDãø]ׄq\wÉêÖŸÊw|»ÏèrÚø(¹º»c<6$†Ï âú/bRÍ)¬ºŸâ†‡Ê¿|…)‘s}:V‰ÆÉ+¤q
SV÷TÞò5ì^à Ý<Åõ¿'¿ô‡1ž[$F]EÅu_À$2MûÉ?s/¥ÍOt¾]àßÕ¦uôŠˆˆœåÓ±‚”ˆˆˆH4šÿû¯CÿÈNB¯Ø>#aÊî1˜Š[¾Ýc0a)GqÝä—ÿ8¾aÙ$ÇÌ#»às'…|…•ÿNi[Ý«oÐo¡…µPaJDDäìQ‰ˆtWèn_BiûRü£» cֵÔÝs•·~«û Âb+ŵ¿&ÿ̽ñË!9~WlÿXùå?ÆÝ¹âÌ£0%""rV)H‰ˆˆˆD'$ðð줴å)J;W4îådŒêšaÊî=²¤ªú[(<ÿK
«îï(Ø Ro$;÷Ó`ÙøGv’_öo¸
«^ûošŒñj«k–,Ôá,""òæ)H‰ˆˆˆD§câú%üCÛ(mz·þY‚æÃtÕ0e÷Må;ÿ «¢a¡™Âê_PXó_ñ ÛI’“o!;ûS`þ¡mä–þoÏÚ×'
maê^Ö"""oâ|¬ %"""
oßúÐî3“Ètü,tóxû7RÚò^ÃsG»Üv;ýÆQùÎÂdª óMžûO
/ü¿øN€©KÞMfÖÇÊãr`3ù%÷àíßøÆïLaJDDäͤDDDD¢qâçC.%1f>NŸQ`':~[ðö§´é Ü=/曺Ìv;/¦òÖ¯aRU„¹Fò«þƒâ‹¿ï8‘&5õýdfÜ€·o¹Å÷àÚúæï4 Á˜ÒmÕ5Ëêt¤‹ˆˆ¼Žó±‚”ˆˆˆH4Žßuuàô¿gØ4’£®Âî5,»ã6a¡÷å5”^zïÀFÂbËyßngÈT*o¾“ª È£°òg7<ß p2Kú²žþA ¼=kÉÕÝ´þßyÀbcJµ
S"""¯q>V‰Æñ»® O]Êt ‰‘W’>»zp§0äŽáÕ¯¢¸ñ1üC[ ÝüyÛîÄð+¨¸ñc’Y‚Ö£ä—ÿ„Ò¦Çâ;NUžþ礧¾ w÷r‹î"hÜsöDaJDD䟤DDDD¢Ñ~…Ô+-OŒ˜AbøC/êê¶Óñ» ùîŽe7?Ap´žÐ+F¾Ý‰Q³¨¸áK'EÐ|ˆüòSÚòT|'Àé*23n#uÉ»pw=C®în‚ÎþƒþƘšêšºz½DDDN9+H‰ˆˆˆDãdꘊѦ,›ä¨Ù$†OÇ<«²ÏÉ+¦Â i¥mu”6?‰ß´|7²íN޽šìµŸoRÉ/ý¥m‹ã;ÎT“¹òä&½ wDzrj9rî4ðï3ÆÔ*L‰ˆˆ´¤DDDD¢ñê Õ1%£=L™d–ĨY$FÌÄ0«¢S¾Yàã7î¡´ù J[4‚À?çÛœp=×ü-ØAÓ>rK„»cYlÇÁÊö$3ë£$'\@iÛbòuw䎟ûW˜)Ïy¤DDDD¢qæ ušIZ¦;É1sI¿»ß8¬lÊá
B¿„d¥Mãn_B;çpN—št3Ùùw€å4î!·ä¸»ž‰í8X•}ÈÌþ8ɱWPÚü$¹Å÷ND¶
aèÝia-¬®©kÔ+CDDÞŽ¤DDDD"òF‚T;«¢Éq×à›†Ó{&Ó
Œ@XlÅ?¼â¦Çqw,oûF¾³?·K]ò.²socák ¿øû¸»WÇv¬nÈÎù$‰Q³ (m|”Ü’ï[£Ý€¦Ðx¦DDäíHAJDDD$"o&Hµ³º$5áZœ!S±{Ǥ*Êa* ‹Íx·PÜð{Ü]+Á÷Îêv§§¾Ì¬O€1øGv’[|Þžµ±«zÙ¹·“~ Å
‘_òƒó÷M†
S""ò6¤ %"""‘7¤:#ŸÝg4ÉqW“|)Võ`L2[^c*ð
'ðö§¸î¼—_8kÛžö§d®ü+ÀàÞF®î¼}ëc;vÏadæÞNbèe _ü-ù¥?"ôKçwÚŒñjªk–Ü«W‹ˆˆ\è¤DDDD"òV®ze˜r]LrÜ‚òÂçÝú—ÀïäŽáî~žâúßáÜòg‹†ôô¿ 3ã/ðn!_w7ÞM±»÷H²ó>ƒ3h2 …çE~ù!ðºÆ4ãÕ*L‰ˆÈ…LAJDDD$"o-HuLß85L%†^Nrµ8ý'`*zaœ4½Á‰x»×P\ÿ þ±†7÷p–MfÆm¤§ý ÞþäêîÆ?´5¶ã`÷CvÞ8. ðÜÏɯüé9]þMQ˜‘˜‚”ˆˆˆHDÎNê˜ÆÑ¦Œ!9z‰1ópúÃd{`ìDy})·@д·~Å
4|õßÿ!¶CæÊžú~ ¼½ëÊAêÈÎØŽƒÓÙyŸÁî7)<û䟹¯ënpÀ‹Æ”jªk–ÕéU$""
)‘ˆœÝ Õ1£=,;Ibì|’cçc÷…•é–
_þF¾Æ=¸;WPÜð{ÂBó«þþ´÷î¤È\õRSþ ïåçÉÕ}ïÍ_qÕ8'‘vïQ†äWþ”Âs?ïú°Ø˜R”ˆˆ\¤DDDD"rn‚TÇ´ŽŽ0•ª 9á’cæ`÷†IU–¿‘/ðòMøGëq·-¦¸éÑS¾‘ïôaÊ$2df}œÔä[pëW‘_rþñ=±gð”rê9€ü²£ðü/ã³
S""rP‰È¹
RÓ;ÚÃ’UÙ›äÄ›IŽº«ÛÀ¶oä| wïàfÜíK)m}ú”õ“:‡)“ª 3ë¤&Ý€»s9¹%? hÚÛqH½ŒÌ¼Ï`÷OnÉ÷)¾øÛøíHàß—žòžÚÌü;êõꑸQ‰H4AêÕìžÃHN¼‰Äðéåoäs’Bè—[ãíßHiûRÜËO&!&UEvî§HN¸€Ò¶Åä—þ ùPlÇ!1bÙ¹·cu¾G®î.ŠŠå¾¤/}/™«>zv¢¨×«LDDâBAJDDD$"ç+Hµ³ûŽ!uñ-$†\†UÙlh[ø¼ùÞ¾
”¶>÷ò''‹™j²sÿšä¸k (m~’ü²%h=ÛqHŒšEvΧ°ºõ'ôKäžü¥ÍOÄr_Ò—ÿ ™ÛÁ?¶û¾üÿ§¶òï©×«MDDº:)‘ˆœï Õ~Õ“3`"©KÞ3d
V¦º¼¾–rM{ñö¬£´uÞ'Eöº/3€âK_ñcÂ\clÇ!9f.™9ŸÂªìCèÉ=þMJÛêb¹/ééNæŠ?ËÁ?ZOîño5¹×/´°V×Ô5êU'""]•‚”ˆˆˆHDÎꘂe“v9©‹oÁ0 “®,ÿÊßÈw¼wÇrüC[INzÇÉ µþAò+~JX8ÛqHŽ_@fÖDZ*zºyZýÆ+>®™™&}ùÊAêðvZŸü6þ¡ÐOaJDDº,)‘ˆt Õ>´0NŠÄ¨«HM¼ »ÏLª¢í—!a® ÿøË˜lìƒ(<ÿ+
«þƒ°ØÛqH^t™«>Š•íAXÊÑúP-îîձܗ̬‘¾ô}`Ùø‡¶–ƒÔáí'o 0%""]”‚”ˆˆˆHDº\jgÙ˜TÉѳIŽ¿»ÏhL"]þ]à—¿Ïv (®ýr‹ï‰õ8¤&½ƒÌ•…Ét',4Óòû/ãí}1–û’™ó)ÒSÞÆÂ;°‘Ü“ßÁ?ºëÕ7h0Æ«®Yr¯^‰""Ò(H‰ˆˆˆD¤Ë©v–ƒUÑ‹ä˜9å0Õk8XN§›øÇwS\÷;J›Ÿ ,4ÇrR—¼‹ÌŒaÒU„ùÆrÚ·!–û’÷R“o-©}ëÉ=õ/øÇÎü
S""ÒE(H‰ˆˆˆD¤Ë©vv»[cæ’šx#V·~´ÅÛ³w×JÜ]Ï–r±‡ô¥ï%}Å_`R•Giýý—ñlŠáLÞ"{u
©‰7•ƒÔžµäžþüã{^ûoŒqkªk–þV¯L9/§1)‘hÄ&H"5ñ&ÒWüVUßο‚æC¸»×à6¬Âݹ/û”¾ì¤§“Ì4¢å÷_./7¶CÅÕŸ%9áz0w÷jrO/$hÚ÷úï#`±1¥Úêšeuz…ŠˆH”¤DDDD"Ç åœDvÞ§±ûŒß%ô]L"¦ü|>Á‰ý¸õÏâÖ¯Âmx®ËïSzúI_ör:±Ÿ–¿ŒdGü&òNŠì5Ÿ%9nA9HíZI®î{'¼ñ;S˜‘¨Ïc
R""""шcJ½ŒÌìO`÷Eè)½ô&U3d*VE¯“7üã/ãîX†[¿
oßú.»O™™&ué{1‰4þñ=´>ô§_¼«Oä“Y²×ü-É1óÊAjÇ2r‹ï!h>ôæï4`±1AMuMÝZ½bED䜞ǤDDDD¢Ë 5b™«>V^àÜ÷È-ú.~ã^¬ÊÞ$FÏ!1äRLªêä„þ‘”¶-ÁÛ½ïà–.·O™Y'uÉ»0N
ÿè.ZºÿøîøMäSUT,ø‰Q³ÀJ[‘_ò‚Ö£oýÎÿ>cLmuM]½^¹""rNÎc
R""""шe5‹ÌUÅî1|—Ö§¾ƒxVe/0Ve#f⼓ª8ù‡¾‹wx¥ÍOáí]×¥>—{;ÉI7—ƒÔám´<üU‚Æ=±;žL¦šŠŸ'1bF9Hm~‚üÒ%È;{¢0%""çê<¦ %"""8©äØ«É̼
«z0¡W$÷Ä·Zb’§Ä'+UÙ‡äèYØýÆc’ÙŽ_…nÿÐVJ›Ÿ,‡©ã/Ÿ÷}Ê^óY’®ÃØI¼›i}ô«Mûcw