Skip to content

Commit

Permalink
Merge branch 'main' into nick/matlab_support
Browse files Browse the repository at this point in the history
  • Loading branch information
dmdunla authored Jan 6, 2025
2 parents 81ed5fe + c3249ad commit fa1ec92
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 13 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
# v1.8.2 (2025-01-06)
- Fixed:
- Fixed layout and printing issues (https://github.com/sandialabs/pyttb/pull/354)
- Fixed tutorial hierarchy (https://github.com/sandialabs/pyttb/pull/343)
- Improved:
- Improved `pyttb_utils` (https://github.com/sandialabs/pyttb/pull/353)
- Improved docs for coming from MATLAB (https://github.com/sandialabs/pyttb/pull/352)
- Improved shape support in data classes (https://github.com/sandialabs/pyttb/pull/348)

# v1.8.1 (2024-11-11)
- Fixed:
- Aligning comparison operator output for data classes (https://github.com/sandialabs/pyttb/pull/331)
Expand Down
6 changes: 3 additions & 3 deletions CITATION.bib
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
@misc{pyttb,
author = {Dunlavy, Daniel M. and Johnson, Nicholas T. and others},
month = nov,
title = {{pyttb: Python Tensor Toolbox, v1.8.1}},
month = jan,
title = {{pyttb: Python Tensor Toolbox, v1.8.2}},
url = {https://github.com/sandialabs/pyttb},
year = {2024}
year = {2025}
}
6 changes: 2 additions & 4 deletions docs/source/matlab/ktensor.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,5 @@ Methods
+-----------------+----------------------+------------------------------------------------------------------------+
| ``tensor`` | ``to_tensor`` | ``X.to_tensor()`` |
+-----------------+----------------------+------------------------------------------------------------------------+

MATLAB methods not included in ``pyttb``
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
* ``viz``
| ``viz`` | ``viz`` | ``X.viz()`` |
+-----------------+----------------------+------------------------------------------------------------------------+
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ requires-python = ">=3.9"
dependencies = [
"numpy<3.0,>=1.24",
"numpy_groupies>0.11",
"scipy>1.9",
"scipy<1.15,>1.9",
"matplotlib>3.7",
]

Expand Down
2 changes: 1 addition & 1 deletion pyttb/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

from __future__ import annotations

__version__ = "1.8.1"
__version__ = "1.8.2"


import warnings
Expand Down
8 changes: 4 additions & 4 deletions pyttb/ktensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -2226,7 +2226,7 @@ def update(self, modes: OneDArray, data: np.ndarray) -> ktensor:

return self

def vis( # noqa: PLR0912, PLR0913
def viz( # noqa: PLR0912, PLR0913
self,
plots: Optional[Union[tuple, list]] = None,
show_figure: bool = True,
Expand Down Expand Up @@ -2295,9 +2295,9 @@ def vis( # noqa: PLR0912, PLR0913
>>> np.random.seed(1)
>>> K = ttb.ktensor.from_function(np.random.random_sample, (2, 3, 10), 2)
Use plot K using default behavior K.vis()
Use plot K using default behavior K.viz()
>>> fig, axs = K.vis(show_figure=False) # doctest: +ELLIPSIS
>>> fig, axs = K.viz(show_figure=False) # doctest: +ELLIPSIS
>>> plt.close(fig)
Define a more realistic plot functions with x labels,
Expand All @@ -2314,7 +2314,7 @@ def vis( # noqa: PLR0912, PLR0913
... ax.semilogx(np.logspace(-2, 2, v.shape[0]), v)
... ax.set_xlabel("$E$, [kJ]")
>>> plots = [mode_1_plot, mode_2_plot, mode_3_plot]
>>> fig, axs = K.vis(
>>> fig, axs = K.viz(
... show_figure=False,
... plots=plots,
... rel_widths=[1, 2, 3],
Expand Down

0 comments on commit fa1ec92

Please sign in to comment.