Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
534af02
checkpoint
dmdunla Apr 16, 2025
e1301b5
First attempt at using autosummary in sphinx documentation
dmdunla Jul 10, 2025
d4b989b
Fixing ruff issues
dmdunla Jul 10, 2025
a90fed9
Trying to get the toctree populated.
dmdunla Jul 10, 2025
292f451
Ruff fixes
dmdunla Jul 10, 2025
63bfe87
Checkpoint
dmdunla Aug 28, 2025
ec82694
Fixing merge conflict
dmdunla Aug 30, 2025
d50a257
Merge branch 'main' into dev-documentation-overhaul
dmdunla Aug 30, 2025
9d99181
Fixing doc problems with recent merges
dmdunla Aug 31, 2025
f785ff4
Another round of updates, still getting warnings/errors with intersphinx
dmdunla Aug 31, 2025
279d3af
More attempts at fixes
dmdunla Aug 31, 2025
683cbaa
Ruff fix
dmdunla Aug 31, 2025
2aebab4
Updating sphinx build flags to better align to RTD.
dmdunla Sep 1, 2025
617c0c8
Merge branch 'main' into dev-documentation-overhaul
dmdunla Sep 1, 2025
2da7cc1
Merge branch 'main' into dev-documentation-overhaul
dmdunla Sep 15, 2025
5e97fd5
Checkpoint on tensor class
dmdunla Sep 19, 2025
a022ab9
Fix formatting
dmdunla Sep 19, 2025
012b01a
Updating tensor docstrings.
dmdunla Oct 5, 2025
84c3604
Updating doctest output for floats
dmdunla Oct 5, 2025
d8a604d
Adding normalize_whitespace directive to address mix of ints and floa…
dmdunla Oct 5, 2025
c43e939
More doctest fixes
dmdunla Oct 5, 2025
f4528a0
Checkpoint
dmdunla Jan 4, 2026
575e8c3
Merge remote-tracking branch 'origin/main' into dev-documentation-ove…
dmdunla Jan 5, 2026
bdd3fa2
Merge remote-tracking branch 'origin/main' into dev-documentation-ove…
dmdunla Jan 5, 2026
ea08ab4
Cleaning merge with recent updates to main
dmdunla Jan 5, 2026
5e3e576
Fixing sphinx output
dmdunla Jan 5, 2026
50265a7
Merge branch 'main' into dev-documentation-overhaul
dmdunla Jan 5, 2026
cc549d9
Fixing docstring error
dmdunla Jan 5, 2026
8270a15
Merge branch 'dev-documentation-overhaul' of github.com:sandialabs/py…
dmdunla Jan 5, 2026
d470e55
More refactor fixes
dmdunla Jan 5, 2026
223d6c1
sptensor formatting
dmdunla Jan 6, 2026
051dfc3
checkpoint
dmdunla Jan 6, 2026
81edc07
sptensor docs
dmdunla Jan 7, 2026
be856ef
Fixed sphinx issue
dmdunla Jan 7, 2026
17862ba
Fixing tenmat formatting, removing extra spaces
dmdunla Jan 8, 2026
d06eee4
Completing ktensor. Alignment in tensor and sptensor.
dmdunla Jan 9, 2026
0186fab
Adding order of methods in dev docs.
dmdunla Jan 9, 2026
1d26175
Fixing issues identified in Nick's PR review.
dmdunla Jan 14, 2026
b49ba01
Ruff fix.
dmdunla Jan 14, 2026
0403d5b
Adding sphinx-toolbox to doc deps to support multiple overloads in sp…
dmdunla Jan 14, 2026
d428b76
Ruff fix.
dmdunla Jan 14, 2026
25bb235
Removing inheritance in docs.
dmdunla Jan 14, 2026
c3c079f
Consistent spelling for element-wise.
dmdunla Jan 14, 2026
7afcaab
Converting all Returns sections to paragraphs in main summary.
dmdunla Jan 14, 2026
7463e80
Check on method ordering and removing extra spaces.
dmdunla Jan 14, 2026
e982fbe
Adjusting using ruff formatting rules.
dmdunla Jan 14, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ current or filing a new [issue](https://github.com/sandialabs/pyttb/issues).
```
1. For the CI version which is more strict
```commandline
sphinx-build ./docs/source ./docs/build -W -n --keep-going
sphinx-build ./docs/source ./docs/build -E -W --keep-going
```
2. If not on Windows optionally add `-j auto` for parallelization
2. Clear notebook outputs if run locally see `nbstripout` in our [pre-commit configuration](.pre-commit-config.yaml)
Expand Down Expand Up @@ -120,6 +120,14 @@ If you want to propose a change to Python Tensor Toolbox, follow these steps:
1. **Update the Code**
- Make the necessary updates in your local environment.
- After making your changes, stage and commit them with an informative message.
- Make sure that the order of methods in classes is consistent with other code in the repository. Specifically, the order should be the following (with methods in each section sorted alphabetically):
1. `__slots__`
1. `__init__`
1. Property methods
1. classmethods (prefixed with `@classmethod`)
1. Public methods
1. Dunder methods (prefixed and suffixed with double underscores `__`)
1. Private methods (prefixed with an underscore `_`)

1. **Push your Changes and Create a Pull Request**
- Push your changes to the new branch in your fork of the repository.
Expand Down
4 changes: 3 additions & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
# ones.
extensions = [
"sphinx.ext.autodoc",
"sphinx_toolbox.more_autodoc.overloads",
"sphinx.ext.intersphinx",
"sphinx.ext.mathjax",
"sphinx.ext.viewcode",
Expand All @@ -72,6 +73,7 @@

intersphinx_mapping = {
"numpy": ("https://numpy.org/doc/stable/", None),
"scipy": ("https://docs.scipy.org/doc/scipy/", None),
"python": ("http://docs.python.org/3.10/", None),
"matplotlib": ("https://matplotlib.org/stable/", None),
}
Expand Down Expand Up @@ -202,4 +204,4 @@
# Autodoc settings
autoclass_content = "class"
autodoc_member_order = "bysource"
autodoc_class_signature = "separated"
autodoc_class_signature = "mixed"
12 changes: 7 additions & 5 deletions docs/source/cpals.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
CP Alternating Least Squares (:obj:`cp_als`)
============================================
.. note::

The ``cp_als`` function defined in ``cp_als.py`` has been promoted to the ``pyttb`` namespace.
CP Alternating Least Squares (:obj:`pyttb.cp_als`)
==================================================

For *all* examples in this document, the following module imports are assumed::

>>> import pyttb as ttb
>>> import numpy as np

.. autofunction:: pyttb.cp_als

12 changes: 7 additions & 5 deletions docs/source/cpapr.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
CP Alternating Poisson Regression (:obj:`cp_apr`)
=================================================
.. note::

The ``cp_apr`` function defined in ``cp_apr.py`` has been promoted to the ``pyttb`` namespace.
CP Alternating Poisson Regression (:obj:`pyttb.cp_apr`)
=======================================================

For *all* examples in this document, the following module imports are assumed::

>>> import pyttb as ttb
>>> import numpy as np

.. autofunction:: pyttb.cp_apr

6 changes: 0 additions & 6 deletions docs/source/functionality.rst

This file was deleted.

8 changes: 5 additions & 3 deletions docs/source/gcpopt.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
Generalized CP Optimization (:obj:`pyttb.gcp_opt`)
==================================================
.. note::

The ``gcp_opt`` function defined in ``gcp_opt.py`` has been promoted to the ``pyttb`` namespace.

For *all* examples in this document, the following module imports are assumed::

>>> import pyttb as ttb
>>> import numpy as np

.. autofunction:: pyttb.gcp_opt

Expand Down
11 changes: 6 additions & 5 deletions docs/source/hosvd.rst
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
Tucker Higher-Order SVD (:obj:`hosvd`)
======================================
.. note::

The ``hosvd`` function defined in ``hosvd.py`` has been promoted to the ``pyttb`` namespace.
Tucker Higher-Order SVD (:obj:`pyttb.hosvd`)
============================================

For *all* examples in this document, the following module imports are assumed::

>>> import pyttb as ttb
>>> import numpy as np

.. autofunction:: pyttb.hosvd
15 changes: 8 additions & 7 deletions docs/source/ktensor.rst
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
Kruskal Tensor (:class:`ktensor`)
---------------------------------
.. note::

The ``ktensor`` class defined in ``ktensor.py`` has been promoted to the ``pyttb`` namespace.
Kruskal Tensor (:class:`pyttb.ktensor`)
=======================================

For *all* examples in this document, the following module imports are assumed::

>>> import pyttb as ttb
>>> import numpy as np

.. autoclass:: pyttb.ktensor
:members:
:special-members:
:exclude-members: __dict__, __weakref__, __slots__
:show-inheritance:
:exclude-members: __init__, __dict__, __weakref__, __deepcopy__
13 changes: 9 additions & 4 deletions docs/source/pyttb_utils.rst
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
Helper Functions (:mod:`pyttb_utils`, :mod:`khatrirao`)
--------------------------------------------------------
Helper Functions (:mod:`pyttb.pyttb_utils`, :mod:`pyttb.khatrirao`)
===================================================================

.. autofunction:: pyttb.khatrirao.khatrirao
For *all* examples in this document, the following module imports are assumed::

>>> import pyttb as ttb
>>> import numpy as np

.. automodule:: pyttb.pyttb_utils
:members:
:special-members:
:exclude-members: __dict__, __weakref__, __slots__
:show-inheritance:
:show-inheritance:

.. autofunction:: pyttb.khatrirao.khatrirao
14 changes: 8 additions & 6 deletions docs/source/sptenmat.rst
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
Sparse Tensor as Matrix (:class:`sptenmat`)
-------------------------------------------
.. note::

The ``sptenmat`` class defined in ``sptenmat.py`` has been promoted to the ``pyttb`` namespace.
Sparse Tensor as Matrix (:class:`pyttb.sptenmat`)
=================================================

For *all* examples in this document, the following module imports are assumed::

>>> import pyttb as ttb
>>> import numpy as np

.. autoclass:: pyttb.sptenmat
:members:
:special-members:
:exclude-members: __dict__, __weakref__, __slots__
:exclude-members: __init__, __dict__, __weakref__, __deepcopy__
:show-inheritance:
17 changes: 9 additions & 8 deletions docs/source/sptensor.rst
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
Sparse Tensor (:class:`sptensor`)
---------------------------------
.. note::

Classes and functions defined in ``sptensor.py`` have been promoted to the ``pyttb`` namespace.
Sparse Tensor (:class:`pyttb.sptensor`)
=======================================

For *all* examples in this document, the following module imports are assumed::

>>> import pyttb as ttb
>>> import numpy as np

.. autoclass:: pyttb.sptensor
:members:
:special-members:
:exclude-members: __dict__, __weakref__, __slots__
:show-inheritance:
:exclude-members: __init__, __dict__, __weakref__, __deepcopy__

.. autofunction:: pyttb.sptendiag
.. autofunction:: pyttb.sptenrand
.. autofunction:: pyttb.sptendiag
13 changes: 7 additions & 6 deletions docs/source/sumtensor.rst
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
Sum Tensor (:class:`sumtensor`)
-------------------------------
.. note::

The ``sumtensor`` class defined in ``sumtensor.py`` has been promoted to the ``pyttb`` namespace.
Sum Tensor (:class:`pyttb.sumtensor`)
=====================================

For *all* examples in this document, the following module imports are assumed::

>>> import pyttb as ttb
>>> import numpy as np

.. autoclass:: pyttb.sumtensor
:members:
:special-members:
:exclude-members: __dict__, __weakref__, __slots__
:exclude-members: __init__, __dict__, __weakref__, __deepcopy__
:show-inheritance:
14 changes: 8 additions & 6 deletions docs/source/tenmat.rst
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
Tensor as Matrix (:class:`tenmat`)
----------------------------------
.. note::

The ``tenmat`` class defined in ``tenmat.py`` has been promoted to the ``pyttb`` namespace.
Tensor as Matrix (:class:`pyttb.tenmat`)
========================================

For *all* examples in this document, the following module imports are assumed::

>>> import pyttb as ttb
>>> import numpy as np

.. autoclass:: pyttb.tenmat
:members:
:special-members:
:exclude-members: __dict__, __weakref__, __slots__
:exclude-members: __init__, __dict__, __weakref__, __deepcopy__
:show-inheritance:
18 changes: 7 additions & 11 deletions docs/source/tensor.rst
Original file line number Diff line number Diff line change
@@ -1,22 +1,18 @@
Dense Tensor (:class:`pyttb.tensor`)
------------------------------------
.. note::

Classes and functions defined in ``tensor.py`` have been promoted to the ``pyttb`` namespace.
====================================

For *all* examples in this document, the following module imports are assumed::
For *all* examples in this document, the following imports are assumed::

>>> import pyttb as ttb
>>> import numpy as np

.. automodule:: pyttb.tensor
.. autoclass:: pyttb.tensor
:members:
:special-members:
:exclude-members: __dict__, __weakref__, __slots__, __deepcopy__
:show-inheritance:
:exclude-members: __init__, __dict__, __weakref__, __deepcopy__

.. autofunction:: pyttb.tenones
.. autofunction:: pyttb.tenzeros
.. autofunction:: pyttb.tenrand
.. autofunction:: pyttb.tendiag
.. autofunction:: pyttb.teneye
.. autofunction:: pyttb.tenones
.. autofunction:: pyttb.tenrand
.. autofunction:: pyttb.tenzeros
10 changes: 6 additions & 4 deletions docs/source/ttensor.rst
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
Tucker tensor (:class:`pyttb.ttensor`)
--------------------------------------
.. note::

The ``ttensor`` class defined in ``ttensor.py`` has been promoted to the ``pyttb`` namespace.

For *all* examples in this document, the following imports are assumed::

>>> import pyttb as ttb
>>> import numpy as np

.. autoclass:: pyttb.ttensor
:members:
:special-members:
:exclude-members: __dict__, __weakref__, __slots__
:exclude-members: __init__, __dict__, __weakref__, __deepcopy__
:show-inheritance:
8 changes: 5 additions & 3 deletions docs/source/tuckerals.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
Tucker Alternating Least Squares (:obj:`pyttb.tucker_als`)
==========================================================
.. note::

The ``tucker_als`` function defined in ``tucker_als.py`` has been promoted to the ``pyttb`` namespace.

For *all* examples in this document, the following module imports are assumed::

>>> import pyttb as ttb
>>> import numpy as np

.. autofunction:: pyttb.tucker_als
Loading
Loading