pax_global_header 0000666 0000000 0000000 00000000064 14025101301 0014475 g ustar 00root root 0000000 0000000 52 comment=32976286cb1eb6638533cffd9bc1646d24f541ad
sparse-0.12.0/ 0000775 0000000 0000000 00000000000 14025101301 0013052 5 ustar 00root root 0000000 0000000 sparse-0.12.0/.codecov.yml 0000664 0000000 0000000 00000000775 14025101301 0015306 0 ustar 00root root 0000000 0000000 comment:
layout: "header, diff, changes, uncovered"
coverage:
status:
project:
default:
# Total project must not drop by more than 3%
target: auto
threshold: "3%"
patch:
default:
# Patch coverage must be 92%
target: auto
threshold: "92%"
precision: 2
round: down
range: 70...98
ignore:
- sparse/tests/
- sparse/_version.py
- ^(?!sparse\/)
codecov:
token: 8de77158-fc37-47be-930c-f98739f9e5bf
sparse-0.12.0/.coveragerc 0000664 0000000 0000000 00000000262 14025101301 0015173 0 ustar 00root root 0000000 0000000 [run]
source=
sparse/
omit=
sparse/_version.py
sparse/tests/*
[report]
exclude_lines =
pragma: no cover
return NotImplemented
raise NotImplementedError
sparse-0.12.0/.gitattributes 0000664 0000000 0000000 00000000040 14025101301 0015737 0 ustar 00root root 0000000 0000000 sparse/_version.py export-subst
sparse-0.12.0/.github/ 0000775 0000000 0000000 00000000000 14025101301 0014412 5 ustar 00root root 0000000 0000000 sparse-0.12.0/.github/CODE_OF_CONDUCT.md 0000664 0000000 0000000 00000000106 14025101301 0017206 0 ustar 00root root 0000000 0000000 # Code of Conduct
Please see [`docs/conduct.md`](../docs/conduct.rst) sparse-0.12.0/.github/FUNDING.yml 0000664 0000000 0000000 00000001225 14025101301 0016227 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.12.0/.github/ISSUE_TEMPLATE/ 0000775 0000000 0000000 00000000000 14025101301 0016575 5 ustar 00root root 0000000 0000000 sparse-0.12.0/.github/ISSUE_TEMPLATE/bug_report.md 0000664 0000000 0000000 00000001056 14025101301 0021271 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.12.0/.github/ISSUE_TEMPLATE/feature_request.md 0000664 0000000 0000000 00000001074 14025101301 0022324 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.12.0/.github/ISSUE_TEMPLATE/question-support.md 0000664 0000000 0000000 00000000501 14025101301 0022474 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.12.0/.gitignore 0000664 0000000 0000000 00000001564 14025101301 0015050 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
sparse-0.12.0/LICENSE 0000664 0000000 0000000 00000002755 14025101301 0014070 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.12.0/MANIFEST.in 0000664 0000000 0000000 00000000504 14025101301 0014607 0 ustar 00root root 0000000 0000000 recursive-include sparse *.py
recursive-include sparse *.html
recursive-include docs *.py
recursive-include docs *.rst
recursive-include docs *.png
include setup.py
include README.rst
include LICENSE
include MANIFEST.in
include requirements.txt
recursive-include requirements *.txt
prune docs/_build
include versioneer.py
sparse-0.12.0/README.rst 0000664 0000000 0000000 00000001713 14025101301 0014543 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://dev.azure.com/einsteinedison/PyData%20Sparse/_apis/build/status/Tests?branchName=master
:target: https://dev.azure.com/einsteinedison/PyData%20Sparse/_build/latest?definitionId=1&branchName=master
: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/master/graph/badge.svg
:target: https://codecov.io/gh/pydata/sparse
:alt: Coverage Report
sparse-0.12.0/asv.conf.json 0000664 0000000 0000000 00000000377 14025101301 0015471 0 ustar 00root root 0000000 0000000 {
"version": 1,
"project": "sparse",
"project_url": "https://sparse.pydata.org/",
"repo": ".",
"dvcs": "git",
"environment_type": "conda",
"env_dir": ".asv/env",
"results_dir": ".asv/results",
"html_dir": ".asv/html"
}
sparse-0.12.0/azure-pipelines.yml 0000664 0000000 0000000 00000001373 14025101301 0016715 0 ustar 00root root 0000000 0000000 jobs:
- job: Linux
variables:
python_version: '3.6'
pool:
vmImage: 'ubuntu-16.04'
steps:
- template: ci/azure-steps.yml
strategy:
matrix:
Python38:
python_version: '3.8'
Python37:
python_version: '3.7'
Python36:
python_version: '3.6'
- job: MacOS
variables:
python_version: '3.6'
pool:
vmImage: 'macos-10.14'
steps:
- template: ci/azure-steps.yml
- job: Windows
variables:
python_version: '3.6'
pool:
vmImage: 'vs2017-win2016'
steps:
- template: ci/azure-steps.yml
- job: Docs
pool:
vmImage: 'ubuntu-16.04'
steps:
- template: ci/azure-docs.yml
trigger:
branches:
include:
- master
tags:
include:
- '*'
pr:
- master
sparse-0.12.0/benchmarks/ 0000775 0000000 0000000 00000000000 14025101301 0015167 5 ustar 00root root 0000000 0000000 sparse-0.12.0/benchmarks/__init__.py 0000664 0000000 0000000 00000000000 14025101301 0017266 0 ustar 00root root 0000000 0000000 sparse-0.12.0/benchmarks/benchmark_coo.py 0000664 0000000 0000000 00000002744 14025101301 0020342 0 ustar 00root root 0000000 0000000 import numpy as np
import sparse
class MatrixMultiplySuite:
def setup(self):
np.random.seed(0)
self.x = sparse.random((100, 100), density=0.01)
self.y = sparse.random((100, 100), density=0.01)
self.x @ self.y # Numba compilation
def time_matmul(self):
self.x @ self.y
class ElemwiseSuite:
def setup(self):
np.random.seed(0)
self.x = sparse.random((100, 100, 100), density=0.01)
self.y = sparse.random((100, 100, 100), density=0.01)
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):
np.random.seed(0)
self.x = sparse.random((100, 1, 100), density=0.01)
self.y = sparse.random((100, 100), density=0.01)
def time_add(self):
self.x + self.y
def time_mul(self):
self.x * self.y
class IndexingSuite:
def setup(self):
np.random.seed(0)
self.index = np.random.randint(0, 100, 50)
self.x = sparse.random((100, 100, 100), density=0.01)
# 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.12.0/benchmarks/benchmark_gcxs.py 0000664 0000000 0000000 00000003115 14025101301 0020517 0 ustar 00root root 0000000 0000000 import numpy as np
import sparse
class MatrixMultiplySuite:
def setup(self):
np.random.seed(0)
self.x = sparse.random((100, 100), density=0.01, format="gcxs")
self.y = sparse.random((100, 100), density=0.01, format="gcxs")
self.x @ self.y # Numba compilation
def time_matmul(self):
self.x @ self.y
class ElemwiseSuite:
def setup(self):
np.random.seed(0)
self.x = sparse.random((100, 100, 100), density=0.01, format="gcxs")
self.y = sparse.random((100, 100, 100), density=0.01, format="gcxs")
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):
np.random.seed(0)
self.x = sparse.random((100, 1, 100), density=0.01, format="gcxs")
self.y = sparse.random((100, 100), density=0.01, format="gcxs")
def time_add(self):
self.x + self.y
def time_mul(self):
self.x * self.y
class IndexingSuite:
def setup(self):
np.random.seed(0)
self.index = np.random.randint(0, 100, 50)
self.x = sparse.random((100, 100, 100), density=0.01, format="gcxs")
# 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.12.0/benchmarks/benchmark_tensordot.py 0000664 0000000 0000000 00000003140 14025101301 0021572 0 ustar 00root root 0000000 0000000 import numpy as np
import sparse
class TensordotSuiteDenseSparse:
"""
Performance comparison for returntype=COO vs returntype=np.ndarray.
tensordot(np.ndarray, COO)
"""
def setup(self):
np.random.seed(0)
self.n = np.random.random((100, 100))
self.s = sparse.random((100, 100, 100, 100), density=0.01)
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):
np.random.seed(0)
self.s1 = sparse.random((100, 100), density=0.01)
self.s2 = sparse.random((100, 100, 100, 100), density=0.01)
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):
np.random.seed(0)
self.s = sparse.random((100, 100, 100, 100), density=0.01)
self.n = np.random.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.12.0/ci/ 0000775 0000000 0000000 00000000000 14025101301 0013445 5 ustar 00root root 0000000 0000000 sparse-0.12.0/ci/01-install.sh 0000775 0000000 0000000 00000000210 14025101301 0015661 0 ustar 00root root 0000000 0000000 #!/usr/bin/env bash
if [[ $NUMPY_VERSION ]]; then
pip install numpy$NUMPY_VERSION;
fi
pip install -e .[tests]
pip install codecov
sparse-0.12.0/ci/azure-docs.yml 0000664 0000000 0000000 00000000611 14025101301 0016242 0 ustar 00root root 0000000 0000000 steps:
- task: UsePythonVersion@0
inputs:
versionSpec: "3.7"
architecture: "x64"
- script: |
pip install -e .[docs]
displayName: Install package
- script: sphinx-build -W -b html docs/ _build/html
displayName: Build documentation
- task: PublishPipelineArtifact@1
inputs:
artifactName: 'Documentation'
targetPath: '$(System.DefaultWorkingDirectory)/_build/html'
sparse-0.12.0/ci/azure-steps.yml 0000664 0000000 0000000 00000001334 14025101301 0016453 0 ustar 00root root 0000000 0000000 steps:
- task: UsePythonVersion@0
inputs:
versionSpec: $(python_version)
architecture: "x64"
- script: |
pip install numpy$NUMPY_VERSION;
pip install -e .[tests]
pip install codecov
displayName: Install package
- script: pytest --pyargs sparse
displayName: Run tests
- script: codecov
displayName: Upload coverage to CodeCov
- task: PublishTestResults@2
condition: always()
inputs:
testResultsFiles: "$(System.DefaultWorkingDirectory)/**/test-*.xml"
testRunTitle: "Publish test results"
- task: PublishCodeCoverageResults@1
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: "$(System.DefaultWorkingDirectory)/**/coverage.xml"
sparse-0.12.0/ci/environment-3.6.yml 0000664 0000000 0000000 00000000312 14025101301 0017034 0 ustar 00root root 0000000 0000000 name: py36-sparse-test
channels:
- conda-forge
dependencies:
- python=3.6
- pip
- pytest
- numpy
- scipy
- pytest-cov
- nomkl
- numba
- black
- codecov
- pip:
- pytest-black
sparse-0.12.0/ci/environment-3.7.yml 0000664 0000000 0000000 00000000312 14025101301 0017035 0 ustar 00root root 0000000 0000000 name: py37-sparse-test
channels:
- conda-forge
dependencies:
- python=3.7
- pip
- pytest
- numpy
- scipy
- pytest-cov
- nomkl
- numba
- black
- codecov
- pip:
- pytest-black
sparse-0.12.0/ci/environment-3.8.yml 0000664 0000000 0000000 00000000312 14025101301 0017036 0 ustar 00root root 0000000 0000000 name: py38-sparse-test
channels:
- conda-forge
dependencies:
- python=3.8
- pip
- pytest
- numpy
- scipy
- pytest-cov
- nomkl
- numba
- black
- codecov
- pip:
- pytest-black
sparse-0.12.0/docs/ 0000775 0000000 0000000 00000000000 14025101301 0014002 5 ustar 00root root 0000000 0000000 sparse-0.12.0/docs/_templates/ 0000775 0000000 0000000 00000000000 14025101301 0016137 5 ustar 00root root 0000000 0000000 sparse-0.12.0/docs/_templates/autosummary/ 0000775 0000000 0000000 00000000000 14025101301 0020525 5 ustar 00root root 0000000 0000000 sparse-0.12.0/docs/_templates/autosummary/base.rst 0000664 0000000 0000000 00000000151 14025101301 0022166 0 ustar 00root root 0000000 0000000 {{ objname | escape | underline}}
.. currentmodule:: {{ module }}
.. auto{{ objtype }}:: {{ objname }}
sparse-0.12.0/docs/_templates/autosummary/class.rst 0000664 0000000 0000000 00000001017 14025101301 0022363 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.12.0/docs/_templates/autosummary/module.rst 0000664 0000000 0000000 00000000654 14025101301 0022551 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.12.0/docs/changelog.rst 0000664 0000000 0000000 00000026530 14025101301 0016471 0 ustar 00root root 0000000 0000000 Changelog
=========
.. currentmodule:: sparse
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.12.0/docs/conduct.rst 0000664 0000000 0000000 00000012460 14025101301 0016176 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
`habbasi@quansight.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 `__.
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.12.0/docs/conf.py 0000664 0000000 0000000 00000014073 14025101301 0015306 0 ustar 00root root 0000000 0000000 #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# 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__ # flake8: 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 master toctree document.
master_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 = None
# 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.png"
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 = [
(master_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 = [(master_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 = [
(
master_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/reference/", None),
}
extlinks = {
"issue": ("https://github.com/pydata/sparse/issues/%s", "Issue #"),
"pr": ("https://github.com/pydata/sparse/pull/%s", "PR #"),
"ghuser": ("https://github.com/%s", "@"),
}
sparse-0.12.0/docs/construct.rst 0000664 0000000 0000000 00000014141 14025101301 0016561 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.todense()
array([[10, 0, 0, 0, 0],
[ 0, 20, 0, 0, 0],
[ 0, 0, 30, 0, 0],
[ 0, 0, 0, 40, 0],
[ 0, 0, 0, 0, 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))
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))
: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)
From :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]
At the end, you can convert the :obj:`DOK` array to a :obj:`COO` array, and
perform arithmetic or other operations on it.
.. 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.12.0/docs/contributing.rst 0000664 0000000 0000000 00000011074 14025101301 0017246 0 ustar 00root root 0000000 0000000 Contributing
============
General Guidelines
------------------
sparse is a community-driven project on GitHub. You can find our
`repository on GitHub `_. 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 `_. 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 ``master`` 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 ``flake8`` 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.12.0/docs/generated/ 0000775 0000000 0000000 00000000000 14025101301 0015740 5 ustar 00root root 0000000 0000000 sparse-0.12.0/docs/generated/sparse.COO.T.rst 0000664 0000000 0000000 00000000102 14025101301 0020601 0 ustar 00root root 0000000 0000000 COO\.T
======
.. currentmodule:: sparse
.. autoattribute:: COO.T sparse-0.12.0/docs/generated/sparse.COO.all.rst 0000664 0000000 0000000 00000000103 14025101301 0021147 0 ustar 00root root 0000000 0000000 COO.all
=======
.. currentmodule:: sparse
.. automethod:: COO.all sparse-0.12.0/docs/generated/sparse.COO.any.rst 0000664 0000000 0000000 00000000103 14025101301 0021166 0 ustar 00root root 0000000 0000000 COO.any
=======
.. currentmodule:: sparse
.. automethod:: COO.any sparse-0.12.0/docs/generated/sparse.COO.asformat.rst 0000664 0000000 0000000 00000000122 14025101301 0022214 0 ustar 00root root 0000000 0000000 COO.asformat
============
.. currentmodule:: sparse
.. automethod:: COO.asformat sparse-0.12.0/docs/generated/sparse.COO.astype.rst 0000664 0000000 0000000 00000000116 14025101301 0021710 0 ustar 00root root 0000000 0000000 COO\.astype
===========
.. currentmodule:: sparse
.. automethod:: COO.astype sparse-0.12.0/docs/generated/sparse.COO.broadcast_to.rst 0000664 0000000 0000000 00000000142 14025101301 0023046 0 ustar 00root root 0000000 0000000 COO\.broadcast\_to
==================
.. currentmodule:: sparse
.. automethod:: COO.broadcast_to sparse-0.12.0/docs/generated/sparse.COO.clip.rst 0000664 0000000 0000000 00000000111 14025101301 0021325 0 ustar 00root root 0000000 0000000 COO\.clip
=========
.. currentmodule:: sparse
.. automethod:: COO.clip
sparse-0.12.0/docs/generated/sparse.COO.conj.rst 0000664 0000000 0000000 00000000111 14025101301 0021327 0 ustar 00root root 0000000 0000000 COO\.conj
=========
.. currentmodule:: sparse
.. automethod:: COO.conj
sparse-0.12.0/docs/generated/sparse.COO.copy.rst 0000664 0000000 0000000 00000000111 14025101301 0021350 0 ustar 00root root 0000000 0000000 COO\.copy
=========
.. currentmodule:: sparse
.. automethod:: COO.copy
sparse-0.12.0/docs/generated/sparse.COO.density.rst 0000664 0000000 0000000 00000000125 14025101301 0022062 0 ustar 00root root 0000000 0000000 COO\.density
============
.. currentmodule:: sparse
.. autoattribute:: COO.density
sparse-0.12.0/docs/generated/sparse.COO.dot.rst 0000664 0000000 0000000 00000000105 14025101301 0021167 0 ustar 00root root 0000000 0000000 COO\.dot
========
.. currentmodule:: sparse
.. automethod:: COO.dot sparse-0.12.0/docs/generated/sparse.COO.dtype.rst 0000664 0000000 0000000 00000000116 14025101301 0021530 0 ustar 00root root 0000000 0000000 COO\.dtype
==========
.. currentmodule:: sparse
.. autoattribute:: COO.dtype sparse-0.12.0/docs/generated/sparse.COO.enable_caching.rst 0000664 0000000 0000000 00000000150 14025101301 0023303 0 ustar 00root root 0000000 0000000 COO\.enable\_caching
====================
.. currentmodule:: sparse
.. automethod:: COO.enable_caching sparse-0.12.0/docs/generated/sparse.COO.flatten.rst 0000664 0000000 0000000 00000000117 14025101301 0022041 0 ustar 00root root 0000000 0000000 COO.flatten
===========
.. currentmodule:: sparse
.. automethod:: COO.flatten sparse-0.12.0/docs/generated/sparse.COO.from_iter.rst 0000664 0000000 0000000 00000000127 14025101301 0022373 0 ustar 00root root 0000000 0000000 COO.from\_iter
==============
.. currentmodule:: sparse
.. automethod:: COO.from_iter sparse-0.12.0/docs/generated/sparse.COO.from_numpy.rst 0000664 0000000 0000000 00000000134 14025101301 0022576 0 ustar 00root root 0000000 0000000 COO\.from\_numpy
================
.. currentmodule:: sparse
.. automethod:: COO.from_numpy sparse-0.12.0/docs/generated/sparse.COO.from_scipy_sparse.rst 0000664 0000000 0000000 00000000163 14025101301 0024134 0 ustar 00root root 0000000 0000000 COO\.from\_scipy\_sparse
========================
.. currentmodule:: sparse
.. automethod:: COO.from_scipy_sparse sparse-0.12.0/docs/generated/sparse.COO.imag.rst 0000664 0000000 0000000 00000000114 14025101301 0021316 0 ustar 00root root 0000000 0000000 COO\.imag
=========
.. currentmodule:: sparse
.. autoattribute:: COO.imag
sparse-0.12.0/docs/generated/sparse.COO.linear_loc.rst 0000664 0000000 0000000 00000000134 14025101301 0022512 0 ustar 00root root 0000000 0000000 COO\.linear\_loc
================
.. currentmodule:: sparse
.. automethod:: COO.linear_loc sparse-0.12.0/docs/generated/sparse.COO.max.rst 0000664 0000000 0000000 00000000105 14025101301 0021166 0 ustar 00root root 0000000 0000000 COO\.max
========
.. currentmodule:: sparse
.. automethod:: COO.max sparse-0.12.0/docs/generated/sparse.COO.maybe_densify.rst 0000664 0000000 0000000 00000000145 14025101301 0023223 0 ustar 00root root 0000000 0000000 COO\.maybe\_densify
===================
.. currentmodule:: sparse
.. automethod:: COO.maybe_densify sparse-0.12.0/docs/generated/sparse.COO.mean.rst 0000664 0000000 0000000 00000000111 14025101301 0021316 0 ustar 00root root 0000000 0000000 COO\.mean
=========
.. currentmodule:: sparse
.. automethod:: COO.mean
sparse-0.12.0/docs/generated/sparse.COO.min.rst 0000664 0000000 0000000 00000000105 14025101301 0021164 0 ustar 00root root 0000000 0000000 COO\.min
========
.. currentmodule:: sparse
.. automethod:: COO.min sparse-0.12.0/docs/generated/sparse.COO.nbytes.rst 0000664 0000000 0000000 00000000121 14025101301 0021703 0 ustar 00root root 0000000 0000000 COO\.nbytes
===========
.. currentmodule:: sparse
.. autoattribute:: COO.nbytes sparse-0.12.0/docs/generated/sparse.COO.ndim.rst 0000664 0000000 0000000 00000000113 14025101301 0021327 0 ustar 00root root 0000000 0000000 COO\.ndim
=========
.. currentmodule:: sparse
.. autoattribute:: COO.ndim sparse-0.12.0/docs/generated/sparse.COO.nnz.rst 0000664 0000000 0000000 00000000110 14025101301 0021202 0 ustar 00root root 0000000 0000000 COO\.nnz
========
.. currentmodule:: sparse
.. autoattribute:: COO.nnz sparse-0.12.0/docs/generated/sparse.COO.nonzero.rst 0000664 0000000 0000000 00000000117 14025101301 0022076 0 ustar 00root root 0000000 0000000 COO.nonzero
===========
.. currentmodule:: sparse
.. automethod:: COO.nonzero sparse-0.12.0/docs/generated/sparse.COO.prod.rst 0000664 0000000 0000000 00000000110 14025101301 0021341 0 ustar 00root root 0000000 0000000 COO\.prod
=========
.. currentmodule:: sparse
.. automethod:: COO.prod sparse-0.12.0/docs/generated/sparse.COO.real.rst 0000664 0000000 0000000 00000000114 14025101301 0021324 0 ustar 00root root 0000000 0000000 COO\.real
=========
.. currentmodule:: sparse
.. autoattribute:: COO.real
sparse-0.12.0/docs/generated/sparse.COO.reduce.rst 0000664 0000000 0000000 00000000116 14025101301 0021652 0 ustar 00root root 0000000 0000000 COO\.reduce
===========
.. currentmodule:: sparse
.. automethod:: COO.reduce sparse-0.12.0/docs/generated/sparse.COO.reshape.rst 0000664 0000000 0000000 00000000121 14025101301 0022026 0 ustar 00root root 0000000 0000000 COO\.reshape
============
.. currentmodule:: sparse
.. automethod:: COO.reshape sparse-0.12.0/docs/generated/sparse.COO.resize.rst 0000664 0000000 0000000 00000000114 14025101301 0021702 0 ustar 00root root 0000000 0000000 COO.resize
==========
.. currentmodule:: sparse
.. automethod:: COO.resize sparse-0.12.0/docs/generated/sparse.COO.round.rst 0000664 0000000 0000000 00000000113 14025101301 0021527 0 ustar 00root root 0000000 0000000 COO\.round
==========
.. currentmodule:: sparse
.. automethod:: COO.round sparse-0.12.0/docs/generated/sparse.COO.rst 0000664 0000000 0000000 00000003034 14025101301 0020406 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.12.0/docs/generated/sparse.COO.size.rst 0000664 0000000 0000000 00000000114 14025101301 0021353 0 ustar 00root root 0000000 0000000 COO\.size
=========
.. currentmodule:: sparse
.. autoattribute:: COO.size
sparse-0.12.0/docs/generated/sparse.COO.std.rst 0000664 0000000 0000000 00000000103 14025101301 0021171 0 ustar 00root root 0000000 0000000 COO.std
=======
.. currentmodule:: sparse
.. automethod:: COO.std sparse-0.12.0/docs/generated/sparse.COO.sum.rst 0000664 0000000 0000000 00000000105 14025101301 0021205 0 ustar 00root root 0000000 0000000 COO\.sum
========
.. currentmodule:: sparse
.. automethod:: COO.sum sparse-0.12.0/docs/generated/sparse.COO.swapaxes.rst 0000664 0000000 0000000 00000000122 14025101301 0022233 0 ustar 00root root 0000000 0000000 COO.swapaxes
============
.. currentmodule:: sparse
.. automethod:: COO.swapaxes sparse-0.12.0/docs/generated/sparse.COO.to_scipy_sparse.rst 0000664 0000000 0000000 00000000155 14025101301 0023614 0 ustar 00root root 0000000 0000000 COO\.to\_scipy\_sparse
======================
.. currentmodule:: sparse
.. automethod:: COO.to_scipy_sparse sparse-0.12.0/docs/generated/sparse.COO.tocsc.rst 0000664 0000000 0000000 00000000113 14025101301 0021513 0 ustar 00root root 0000000 0000000 COO\.tocsc
==========
.. currentmodule:: sparse
.. automethod:: COO.tocsc sparse-0.12.0/docs/generated/sparse.COO.tocsr.rst 0000664 0000000 0000000 00000000113 14025101301 0021532 0 ustar 00root root 0000000 0000000 COO\.tocsr
==========
.. currentmodule:: sparse
.. automethod:: COO.tocsr sparse-0.12.0/docs/generated/sparse.COO.todense.rst 0000664 0000000 0000000 00000000121 14025101301 0022040 0 ustar 00root root 0000000 0000000 COO\.todense
============
.. currentmodule:: sparse
.. automethod:: COO.todense sparse-0.12.0/docs/generated/sparse.COO.transpose.rst 0000664 0000000 0000000 00000000127 14025101301 0022423 0 ustar 00root root 0000000 0000000 COO\.transpose
==============
.. currentmodule:: sparse
.. automethod:: COO.transpose sparse-0.12.0/docs/generated/sparse.COO.var.rst 0000664 0000000 0000000 00000000103 14025101301 0021167 0 ustar 00root root 0000000 0000000 COO.var
=======
.. currentmodule:: sparse
.. automethod:: COO.var sparse-0.12.0/docs/generated/sparse.DOK.asformat.rst 0000664 0000000 0000000 00000000122 14025101301 0022211 0 ustar 00root root 0000000 0000000 DOK.asformat
============
.. currentmodule:: sparse
.. automethod:: DOK.asformat sparse-0.12.0/docs/generated/sparse.DOK.density.rst 0000664 0000000 0000000 00000000124 14025101301 0022056 0 ustar 00root root 0000000 0000000 DOK\.density
============
.. currentmodule:: sparse
.. autoattribute:: DOK.density sparse-0.12.0/docs/generated/sparse.DOK.from_coo.rst 0000664 0000000 0000000 00000000126 14025101301 0022204 0 ustar 00root root 0000000 0000000 DOK\.from\_coo
==============
.. currentmodule:: sparse
.. automethod:: DOK.from_coo sparse-0.12.0/docs/generated/sparse.DOK.from_numpy.rst 0000664 0000000 0000000 00000000134 14025101301 0022573 0 ustar 00root root 0000000 0000000 DOK\.from\_numpy
================
.. currentmodule:: sparse
.. automethod:: DOK.from_numpy sparse-0.12.0/docs/generated/sparse.DOK.ndim.rst 0000664 0000000 0000000 00000000113 14025101301 0021324 0 ustar 00root root 0000000 0000000 DOK\.ndim
=========
.. currentmodule:: sparse
.. autoattribute:: DOK.ndim sparse-0.12.0/docs/generated/sparse.DOK.nnz.rst 0000664 0000000 0000000 00000000110 14025101301 0021177 0 ustar 00root root 0000000 0000000 DOK\.nnz
========
.. currentmodule:: sparse
.. autoattribute:: DOK.nnz sparse-0.12.0/docs/generated/sparse.DOK.rst 0000664 0000000 0000000 00000000615 14025101301 0020405 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.to_coo
DOK.todense
sparse-0.12.0/docs/generated/sparse.DOK.size.rst 0000664 0000000 0000000 00000000113 14025101301 0021347 0 ustar 00root root 0000000 0000000 DOK\.size
=========
.. currentmodule:: sparse
.. autoattribute:: DOK.size sparse-0.12.0/docs/generated/sparse.DOK.to_coo.rst 0000664 0000000 0000000 00000000120 14025101301 0021655 0 ustar 00root root 0000000 0000000 DOK\.to\_coo
============
.. currentmodule:: sparse
.. automethod:: DOK.to_coo sparse-0.12.0/docs/generated/sparse.DOK.todense.rst 0000664 0000000 0000000 00000000121 14025101301 0022035 0 ustar 00root root 0000000 0000000 DOK\.todense
============
.. currentmodule:: sparse
.. automethod:: DOK.todense sparse-0.12.0/docs/generated/sparse.GCXS.T.rst 0000664 0000000 0000000 00000000102 14025101301 0020725 0 ustar 00root root 0000000 0000000 GCXS.T
======
.. currentmodule:: sparse
.. autoproperty:: GCXS.T sparse-0.12.0/docs/generated/sparse.GCXS.__init__.rst 0000664 0000000 0000000 00000000135 14025101301 0022267 0 ustar 00root root 0000000 0000000 GCXS.\_\_init\_\_
=================
.. currentmodule:: sparse
.. automethod:: GCXS.__init__ sparse-0.12.0/docs/generated/sparse.GCXS.all.rst 0000664 0000000 0000000 00000000106 14025101301 0021276 0 ustar 00root root 0000000 0000000 GCXS.all
========
.. currentmodule:: sparse
.. automethod:: GCXS.all sparse-0.12.0/docs/generated/sparse.GCXS.amax.rst 0000664 0000000 0000000 00000000111 14025101301 0021450 0 ustar 00root root 0000000 0000000 GCXS.amax
=========
.. currentmodule:: sparse
.. automethod:: GCXS.amax sparse-0.12.0/docs/generated/sparse.GCXS.amin.rst 0000664 0000000 0000000 00000000111 14025101301 0021446 0 ustar 00root root 0000000 0000000 GCXS.amin
=========
.. currentmodule:: sparse
.. automethod:: GCXS.amin sparse-0.12.0/docs/generated/sparse.GCXS.any.rst 0000664 0000000 0000000 00000000106 14025101301 0021315 0 ustar 00root root 0000000 0000000 GCXS.any
========
.. currentmodule:: sparse
.. automethod:: GCXS.any sparse-0.12.0/docs/generated/sparse.GCXS.asformat.rst 0000664 0000000 0000000 00000000125 14025101301 0022343 0 ustar 00root root 0000000 0000000 GCXS.asformat
=============
.. currentmodule:: sparse
.. automethod:: GCXS.asformat sparse-0.12.0/docs/generated/sparse.GCXS.astype.rst 0000664 0000000 0000000 00000000117 14025101301 0022035 0 ustar 00root root 0000000 0000000 GCXS.astype
===========
.. currentmodule:: sparse
.. automethod:: GCXS.astype sparse-0.12.0/docs/generated/sparse.GCXS.change_compressed_axes.rst 0000664 0000000 0000000 00000000203 14025101301 0025215 0 ustar 00root root 0000000 0000000 GCXS.change\_compressed\_axes
=============================
.. currentmodule:: sparse
.. automethod:: GCXS.change_compressed_axes sparse-0.12.0/docs/generated/sparse.GCXS.clip.rst 0000664 0000000 0000000 00000000111 14025101301 0021451 0 ustar 00root root 0000000 0000000 GCXS.clip
=========
.. currentmodule:: sparse
.. automethod:: GCXS.clip sparse-0.12.0/docs/generated/sparse.GCXS.compressed_axes.rst 0000664 0000000 0000000 00000000156 14025101301 0023717 0 ustar 00root root 0000000 0000000 GCXS.compressed\_axes
=====================
.. currentmodule:: sparse
.. autoproperty:: GCXS.compressed_axes sparse-0.12.0/docs/generated/sparse.GCXS.conj.rst 0000664 0000000 0000000 00000000111 14025101301 0021453 0 ustar 00root root 0000000 0000000 GCXS.conj
=========
.. currentmodule:: sparse
.. automethod:: GCXS.conj sparse-0.12.0/docs/generated/sparse.GCXS.copy.rst 0000664 0000000 0000000 00000000111 14025101301 0021474 0 ustar 00root root 0000000 0000000 GCXS.copy
=========
.. currentmodule:: sparse
.. automethod:: GCXS.copy sparse-0.12.0/docs/generated/sparse.GCXS.density.rst 0000664 0000000 0000000 00000000124 14025101301 0022205 0 ustar 00root root 0000000 0000000 GCXS.density
============
.. currentmodule:: sparse
.. autoproperty:: GCXS.density sparse-0.12.0/docs/generated/sparse.GCXS.dot.rst 0000664 0000000 0000000 00000000106 14025101301 0021314 0 ustar 00root root 0000000 0000000 GCXS.dot
========
.. currentmodule:: sparse
.. automethod:: GCXS.dot sparse-0.12.0/docs/generated/sparse.GCXS.dtype.rst 0000664 0000000 0000000 00000000116 14025101301 0021654 0 ustar 00root root 0000000 0000000 GCXS.dtype
==========
.. currentmodule:: sparse
.. autoproperty:: GCXS.dtype sparse-0.12.0/docs/generated/sparse.GCXS.flatten.rst 0000664 0000000 0000000 00000000122 14025101301 0022161 0 ustar 00root root 0000000 0000000 GCXS.flatten
============
.. currentmodule:: sparse
.. automethod:: GCXS.flatten sparse-0.12.0/docs/generated/sparse.GCXS.from_coo.rst 0000664 0000000 0000000 00000000127 14025101301 0022334 0 ustar 00root root 0000000 0000000 GCXS.from\_coo
==============
.. currentmodule:: sparse
.. automethod:: GCXS.from_coo sparse-0.12.0/docs/generated/sparse.GCXS.from_iter.rst 0000664 0000000 0000000 00000000132 14025101301 0022513 0 ustar 00root root 0000000 0000000 GCXS.from\_iter
===============
.. currentmodule:: sparse
.. automethod:: GCXS.from_iter sparse-0.12.0/docs/generated/sparse.GCXS.from_numpy.rst 0000664 0000000 0000000 00000000135 14025101301 0022723 0 ustar 00root root 0000000 0000000 GCXS.from\_numpy
================
.. currentmodule:: sparse
.. automethod:: GCXS.from_numpy sparse-0.12.0/docs/generated/sparse.GCXS.from_scipy_sparse.rst 0000664 0000000 0000000 00000000164 14025101301 0024261 0 ustar 00root root 0000000 0000000 GCXS.from\_scipy\_sparse
========================
.. currentmodule:: sparse
.. automethod:: GCXS.from_scipy_sparse sparse-0.12.0/docs/generated/sparse.GCXS.imag.rst 0000664 0000000 0000000 00000000113 14025101301 0021441 0 ustar 00root root 0000000 0000000 GCXS.imag
=========
.. currentmodule:: sparse
.. autoproperty:: GCXS.imag sparse-0.12.0/docs/generated/sparse.GCXS.max.rst 0000664 0000000 0000000 00000000106 14025101301 0021313 0 ustar 00root root 0000000 0000000 GCXS.max
========
.. currentmodule:: sparse
.. automethod:: GCXS.max sparse-0.12.0/docs/generated/sparse.GCXS.maybe_densify.rst 0000664 0000000 0000000 00000000146 14025101301 0023350 0 ustar 00root root 0000000 0000000 GCXS.maybe\_densify
===================
.. currentmodule:: sparse
.. automethod:: GCXS.maybe_densify sparse-0.12.0/docs/generated/sparse.GCXS.mean.rst 0000664 0000000 0000000 00000000111 14025101301 0021442 0 ustar 00root root 0000000 0000000 GCXS.mean
=========
.. currentmodule:: sparse
.. automethod:: GCXS.mean sparse-0.12.0/docs/generated/sparse.GCXS.min.rst 0000664 0000000 0000000 00000000106 14025101301 0021311 0 ustar 00root root 0000000 0000000 GCXS.min
========
.. currentmodule:: sparse
.. automethod:: GCXS.min sparse-0.12.0/docs/generated/sparse.GCXS.nbytes.rst 0000664 0000000 0000000 00000000121 14025101301 0022027 0 ustar 00root root 0000000 0000000 GCXS.nbytes
===========
.. currentmodule:: sparse
.. autoproperty:: GCXS.nbytes sparse-0.12.0/docs/generated/sparse.GCXS.ndim.rst 0000664 0000000 0000000 00000000113 14025101301 0021453 0 ustar 00root root 0000000 0000000 GCXS.ndim
=========
.. currentmodule:: sparse
.. autoproperty:: GCXS.ndim sparse-0.12.0/docs/generated/sparse.GCXS.nnz.rst 0000664 0000000 0000000 00000000110 14025101301 0021326 0 ustar 00root root 0000000 0000000 GCXS.nnz
========
.. currentmodule:: sparse
.. autoproperty:: GCXS.nnz sparse-0.12.0/docs/generated/sparse.GCXS.prod.rst 0000664 0000000 0000000 00000000111 14025101301 0021466 0 ustar 00root root 0000000 0000000 GCXS.prod
=========
.. currentmodule:: sparse
.. automethod:: GCXS.prod sparse-0.12.0/docs/generated/sparse.GCXS.real.rst 0000664 0000000 0000000 00000000113 14025101301 0021447 0 ustar 00root root 0000000 0000000 GCXS.real
=========
.. currentmodule:: sparse
.. autoproperty:: GCXS.real sparse-0.12.0/docs/generated/sparse.GCXS.reduce.rst 0000664 0000000 0000000 00000000117 14025101301 0021777 0 ustar 00root root 0000000 0000000 GCXS.reduce
===========
.. currentmodule:: sparse
.. automethod:: GCXS.reduce sparse-0.12.0/docs/generated/sparse.GCXS.reshape.rst 0000664 0000000 0000000 00000000122 14025101301 0022153 0 ustar 00root root 0000000 0000000 GCXS.reshape
============
.. currentmodule:: sparse
.. automethod:: GCXS.reshape sparse-0.12.0/docs/generated/sparse.GCXS.round.rst 0000664 0000000 0000000 00000000114 14025101301 0021654 0 ustar 00root root 0000000 0000000 GCXS.round
==========
.. currentmodule:: sparse
.. automethod:: GCXS.round sparse-0.12.0/docs/generated/sparse.GCXS.round_.rst 0000664 0000000 0000000 00000000121 14025101301 0022011 0 ustar 00root root 0000000 0000000 GCXS.round\_
============
.. currentmodule:: sparse
.. automethod:: GCXS.round_ sparse-0.12.0/docs/generated/sparse.GCXS.rst 0000664 0000000 0000000 00000002262 14025101301 0020534 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.12.0/docs/generated/sparse.GCXS.size.rst 0000664 0000000 0000000 00000000113 14025101301 0021476 0 ustar 00root root 0000000 0000000 GCXS.size
=========
.. currentmodule:: sparse
.. autoproperty:: GCXS.size sparse-0.12.0/docs/generated/sparse.GCXS.std.rst 0000664 0000000 0000000 00000000106 14025101301 0021320 0 ustar 00root root 0000000 0000000 GCXS.std
========
.. currentmodule:: sparse
.. automethod:: GCXS.std sparse-0.12.0/docs/generated/sparse.GCXS.sum.rst 0000664 0000000 0000000 00000000106 14025101301 0021332 0 ustar 00root root 0000000 0000000 GCXS.sum
========
.. currentmodule:: sparse
.. automethod:: GCXS.sum sparse-0.12.0/docs/generated/sparse.GCXS.to_scipy_sparse.rst 0000664 0000000 0000000 00000000156 14025101301 0023741 0 ustar 00root root 0000000 0000000 GCXS.to\_scipy\_sparse
======================
.. currentmodule:: sparse
.. automethod:: GCXS.to_scipy_sparse sparse-0.12.0/docs/generated/sparse.GCXS.tocoo.rst 0000664 0000000 0000000 00000000114 14025101301 0021650 0 ustar 00root root 0000000 0000000 GCXS.tocoo
==========
.. currentmodule:: sparse
.. automethod:: GCXS.tocoo sparse-0.12.0/docs/generated/sparse.GCXS.todense.rst 0000664 0000000 0000000 00000000122 14025101301 0022165 0 ustar 00root root 0000000 0000000 GCXS.todense
============
.. currentmodule:: sparse
.. automethod:: GCXS.todense sparse-0.12.0/docs/generated/sparse.GCXS.todok.rst 0000664 0000000 0000000 00000000114 14025101301 0021645 0 ustar 00root root 0000000 0000000 GCXS.todok
==========
.. currentmodule:: sparse
.. automethod:: GCXS.todok sparse-0.12.0/docs/generated/sparse.GCXS.transpose.rst 0000664 0000000 0000000 00000000130 14025101301 0022541 0 ustar 00root root 0000000 0000000 GCXS.transpose
==============
.. currentmodule:: sparse
.. automethod:: GCXS.transpose sparse-0.12.0/docs/generated/sparse.GCXS.var.rst 0000664 0000000 0000000 00000000106 14025101301 0021316 0 ustar 00root root 0000000 0000000 GCXS.var
========
.. currentmodule:: sparse
.. automethod:: GCXS.var sparse-0.12.0/docs/generated/sparse.SparseArray.asformat.rst 0000664 0000000 0000000 00000000152 14025101301 0024033 0 ustar 00root root 0000000 0000000 SparseArray.asformat
====================
.. currentmodule:: sparse
.. automethod:: SparseArray.asformat sparse-0.12.0/docs/generated/sparse.SparseArray.density.rst 0000664 0000000 0000000 00000000154 14025101301 0023700 0 ustar 00root root 0000000 0000000 SparseArray\.density
====================
.. currentmodule:: sparse
.. autoattribute:: SparseArray.density sparse-0.12.0/docs/generated/sparse.SparseArray.ndim.rst 0000664 0000000 0000000 00000000143 14025101301 0023146 0 ustar 00root root 0000000 0000000 SparseArray\.ndim
=================
.. currentmodule:: sparse
.. autoattribute:: SparseArray.ndim sparse-0.12.0/docs/generated/sparse.SparseArray.nnz.rst 0000664 0000000 0000000 00000000140 14025101301 0023021 0 ustar 00root root 0000000 0000000 SparseArray\.nnz
================
.. currentmodule:: sparse
.. autoattribute:: SparseArray.nnz sparse-0.12.0/docs/generated/sparse.SparseArray.rst 0000664 0000000 0000000 00000000540 14025101301 0022221 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.12.0/docs/generated/sparse.SparseArray.size.rst 0000664 0000000 0000000 00000000143 14025101301 0023171 0 ustar 00root root 0000000 0000000 SparseArray\.size
=================
.. currentmodule:: sparse
.. autoattribute:: SparseArray.size sparse-0.12.0/docs/generated/sparse.SparseArray.todense.rst 0000664 0000000 0000000 00000000147 14025101301 0023664 0 ustar 00root root 0000000 0000000 SparseArray.todense
===================
.. currentmodule:: sparse
.. automethod:: SparseArray.todense sparse-0.12.0/docs/generated/sparse.argwhere.rst 0000664 0000000 0000000 00000000110 14025101301 0021562 0 ustar 00root root 0000000 0000000 argwhere
========
.. currentmodule:: sparse
.. autofunction:: argwhere sparse-0.12.0/docs/generated/sparse.as_coo.rst 0000664 0000000 0000000 00000000104 14025101301 0021224 0 ustar 00root root 0000000 0000000 as\_coo
=======
.. currentmodule:: sparse
.. autofunction:: as_coo sparse-0.12.0/docs/generated/sparse.clip.rst 0000664 0000000 0000000 00000000074 14025101301 0020716 0 ustar 00root root 0000000 0000000 clip
====
.. currentmodule:: sparse
.. autofunction:: clip sparse-0.12.0/docs/generated/sparse.concatenate.rst 0000664 0000000 0000000 00000000121 14025101301 0022244 0 ustar 00root root 0000000 0000000 concatenate
===========
.. currentmodule:: sparse
.. autofunction:: concatenate sparse-0.12.0/docs/generated/sparse.diagonal.rst 0000664 0000000 0000000 00000000115 14025101301 0021541 0 ustar 00root root 0000000 0000000 diagonal
=============
.. currentmodule:: sparse
.. autofunction:: diagonal sparse-0.12.0/docs/generated/sparse.diagonalize.rst 0000664 0000000 0000000 00000000121 14025101301 0022246 0 ustar 00root root 0000000 0000000 diagonalize
===========
.. currentmodule:: sparse
.. autofunction:: diagonalize sparse-0.12.0/docs/generated/sparse.dot.rst 0000664 0000000 0000000 00000000071 14025101301 0020552 0 ustar 00root root 0000000 0000000 dot
===
.. currentmodule:: sparse
.. autofunction:: dot sparse-0.12.0/docs/generated/sparse.elemwise.rst 0000664 0000000 0000000 00000000110 14025101301 0021570 0 ustar 00root root 0000000 0000000 elemwise
========
.. currentmodule:: sparse
.. autofunction:: elemwise sparse-0.12.0/docs/generated/sparse.eye.rst 0000664 0000000 0000000 00000000072 14025101301 0020547 0 ustar 00root root 0000000 0000000 eye
===
.. currentmodule:: sparse
.. autofunction:: eye
sparse-0.12.0/docs/generated/sparse.full.rst 0000664 0000000 0000000 00000000075 14025101301 0020732 0 ustar 00root root 0000000 0000000 full
====
.. currentmodule:: sparse
.. autofunction:: full
sparse-0.12.0/docs/generated/sparse.full_like.rst 0000664 0000000 0000000 00000000114 14025101301 0021730 0 ustar 00root root 0000000 0000000 full_like
=========
.. currentmodule:: sparse
.. autofunction:: full_like
sparse-0.12.0/docs/generated/sparse.isneginf.rst 0000664 0000000 0000000 00000000110 14025101301 0021560 0 ustar 00root root 0000000 0000000 isneginf
========
.. currentmodule:: sparse
.. autofunction:: isneginf sparse-0.12.0/docs/generated/sparse.isposinf.rst 0000664 0000000 0000000 00000000110 14025101301 0021610 0 ustar 00root root 0000000 0000000 isposinf
========
.. currentmodule:: sparse
.. autofunction:: isposinf sparse-0.12.0/docs/generated/sparse.kron.rst 0000664 0000000 0000000 00000000075 14025101301 0020741 0 ustar 00root root 0000000 0000000 kron
====
.. currentmodule:: sparse
.. autofunction:: kron
sparse-0.12.0/docs/generated/sparse.load_npz.rst 0000664 0000000 0000000 00000000112 14025101301 0021566 0 ustar 00root root 0000000 0000000 load\_npz
=========
.. currentmodule:: sparse
.. autofunction:: load_npz sparse-0.12.0/docs/generated/sparse.matmul.rst 0000664 0000000 0000000 00000000102 14025101301 0021256 0 ustar 00root root 0000000 0000000 matmul
======
.. currentmodule:: sparse
.. autofunction:: matmul sparse-0.12.0/docs/generated/sparse.moveaxis.rst 0000664 0000000 0000000 00000000110 14025101301 0021611 0 ustar 00root root 0000000 0000000 moveaxis
========
.. currentmodule:: sparse
.. autofunction:: moveaxis sparse-0.12.0/docs/generated/sparse.nanmax.rst 0000664 0000000 0000000 00000000102 14025101301 0021241 0 ustar 00root root 0000000 0000000 nanmax
======
.. currentmodule:: sparse
.. autofunction:: nanmax sparse-0.12.0/docs/generated/sparse.nanmean.rst 0000664 0000000 0000000 00000000106 14025101301 0021400 0 ustar 00root root 0000000 0000000 nanmean
=======
.. currentmodule:: sparse
.. autofunction:: nanmean
sparse-0.12.0/docs/generated/sparse.nanmin.rst 0000664 0000000 0000000 00000000102 14025101301 0021237 0 ustar 00root root 0000000 0000000 nanmin
======
.. currentmodule:: sparse
.. autofunction:: nanmin sparse-0.12.0/docs/generated/sparse.nanprod.rst 0000664 0000000 0000000 00000000105 14025101301 0021423 0 ustar 00root root 0000000 0000000 nanprod
=======
.. currentmodule:: sparse
.. autofunction:: nanprod sparse-0.12.0/docs/generated/sparse.nanreduce.rst 0000664 0000000 0000000 00000000113 14025101301 0021725 0 ustar 00root root 0000000 0000000 nanreduce
=========
.. currentmodule:: sparse
.. autofunction:: nanreduce sparse-0.12.0/docs/generated/sparse.nansum.rst 0000664 0000000 0000000 00000000102 14025101301 0021260 0 ustar 00root root 0000000 0000000 nansum
======
.. currentmodule:: sparse
.. autofunction:: nansum sparse-0.12.0/docs/generated/sparse.ones.rst 0000664 0000000 0000000 00000000075 14025101301 0020734 0 ustar 00root root 0000000 0000000 ones
====
.. currentmodule:: sparse
.. autofunction:: ones
sparse-0.12.0/docs/generated/sparse.ones_like.rst 0000664 0000000 0000000 00000000114 14025101301 0021732 0 ustar 00root root 0000000 0000000 ones_like
=========
.. currentmodule:: sparse
.. autofunction:: ones_like
sparse-0.12.0/docs/generated/sparse.outer.rst 0000664 0000000 0000000 00000000077 14025101301 0021130 0 ustar 00root root 0000000 0000000 outer
=====
.. currentmodule:: sparse
.. autofunction:: outer sparse-0.12.0/docs/generated/sparse.random.rst 0000664 0000000 0000000 00000000102 14025101301 0021237 0 ustar 00root root 0000000 0000000 random
======
.. currentmodule:: sparse
.. autofunction:: random sparse-0.12.0/docs/generated/sparse.result_type.rst 0000664 0000000 0000000 00000000121 14025101301 0022337 0 ustar 00root root 0000000 0000000 result_type
===========
.. currentmodule:: sparse
.. autofunction:: result_type sparse-0.12.0/docs/generated/sparse.roll.rst 0000664 0000000 0000000 00000000074 14025101301 0020737 0 ustar 00root root 0000000 0000000 roll
====
.. currentmodule:: sparse
.. autofunction:: roll sparse-0.12.0/docs/generated/sparse.rst 0000664 0000000 0000000 00000001306 14025101301 0017767 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:
argwhere
as_coo
concatenate
clip
diagonal
diagonalize
dot
elemwise
eye
full
full_like
isposinf
isneginf
kron
load_npz
matmul
moveaxis
nanmax
nanmean
nanmin
nanprod
nanreduce
nansum
ones
ones_like
outer
random
result_type
roll
save_npz
stack
tensordot
tril
triu
where
zeros
zeros_like
sparse-0.12.0/docs/generated/sparse.save_npz.rst 0000664 0000000 0000000 00000000112 14025101301 0021605 0 ustar 00root root 0000000 0000000 save\_npz
=========
.. currentmodule:: sparse
.. autofunction:: save_npz sparse-0.12.0/docs/generated/sparse.stack.rst 0000664 0000000 0000000 00000000077 14025101301 0021077 0 ustar 00root root 0000000 0000000 stack
=====
.. currentmodule:: sparse
.. autofunction:: stack sparse-0.12.0/docs/generated/sparse.tensordot.rst 0000664 0000000 0000000 00000000113 14025101301 0022002 0 ustar 00root root 0000000 0000000 tensordot
=========
.. currentmodule:: sparse
.. autofunction:: tensordot sparse-0.12.0/docs/generated/sparse.tril.rst 0000664 0000000 0000000 00000000074 14025101301 0020741 0 ustar 00root root 0000000 0000000 tril
====
.. currentmodule:: sparse
.. autofunction:: tril sparse-0.12.0/docs/generated/sparse.triu.rst 0000664 0000000 0000000 00000000074 14025101301 0020752 0 ustar 00root root 0000000 0000000 triu
====
.. currentmodule:: sparse
.. autofunction:: triu sparse-0.12.0/docs/generated/sparse.where.rst 0000664 0000000 0000000 00000000077 14025101301 0021104 0 ustar 00root root 0000000 0000000 where
=====
.. currentmodule:: sparse
.. autofunction:: where sparse-0.12.0/docs/generated/sparse.zeros.rst 0000664 0000000 0000000 00000000100 14025101301 0021117 0 ustar 00root root 0000000 0000000 zeros
=====
.. currentmodule:: sparse
.. autofunction:: zeros
sparse-0.12.0/docs/generated/sparse.zeros_like.rst 0000664 0000000 0000000 00000000117 14025101301 0022133 0 ustar 00root root 0000000 0000000 zeros_like
==========
.. currentmodule:: sparse
.. autofunction:: zeros_like
sparse-0.12.0/docs/index.rst 0000664 0000000 0000000 00000005615 14025101301 0015652 0 ustar 00root root 0000000 0000000 Sparse
======
.. image:: logo.png
:alt: Logo
:align: center
:width: 20em
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.
It lacks layouts that are not easily generalized like CSR/CSC
and depends on scipy.sparse for some computations.
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.
Fortunately in many cases we can leverage the existing :obj:`scipy.sparse`
algorithms if we can intelligently transpose and reshape our multi-dimensional
array into an appropriate 2-d sparse matrix, perform a modified sparse matrix
operation, and then reshape and transpose back. These reshape and transpose
operations can all be done at numpy speeds by modifying the arrays of
coordinates. After scipy.sparse runs its operations (often written in C) then
we can convert back to using the same path of reshapings and transpositions in
reverse.
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.12.0/docs/install.rst 0000664 0000000 0000000 00000000763 14025101301 0016210 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.12.0/docs/logo.png 0000664 0000000 0000000 00000672445 14025101301 0015472 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