Hypertools

Latest version: v0.8.0

Safety actively analyzes 682404 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 4

8.1

+ updated all examples/docs with new syntax changes
+ added new tests for new features

0.7.0

Control over matplotlib backend & various bug fixes

New features:
- Create animated plots in an environment with a non-interactive `matplotlib` plotting backend set, without disrupting the global plotting backend
![](https://user-images.githubusercontent.com/26118297/96681820-de689880-1345-11eb-9d17-31abbc82ad3c.gif)
- Create non-animated, interactive plots for easy inspection of data using the new `interactive` keyword argument
![](https://user-images.githubusercontent.com/26118297/96682533-f2f96080-1346-11eb-9c85-0a64aac57098.gif)
- Set the plotting backend for a single plot using the new `mpl_backend` keyword argument, and easily switch between backends within a single Python interpreter session, IPython kernel, and even Jupyter notebook cell
![](https://user-images.githubusercontent.com/26118297/96685859-b54b0680-134b-11eb-98fb-906069d21856.gif)
- Use the new `hypertools.set_interactive_backend` function to change the backend for all future plots, or use it as a context manager to temporarily switch to a different backend. You can also use this to create multiple animated/interactive plots simultaneously.
![](https://user-images.githubusercontent.com/26118297/96688723-7e76ef80-134f-11eb-9b02-56bcd62a92cf.gif)
- use `hypertools`'s backend adjustments to control behavior of other plotting libraries
![](https://user-images.githubusercontent.com/26118297/96691294-bcc1de00-1352-11eb-971c-3ee9c1098b46.gif)
- Set the `$HYPERTOOLS_BACKEND` environment variable to permanently set your preferred plotting backend for non-IPython environments

**NB**: Currently supported backends include TkInter, GTK, wxPython, Qt4, Qt5, Cocoa (aka MacOSX; MacOS only), notebook/nbAgg (Jupyter notebooks only), and ipympl/widget (Jupyter notebooks only). 3D and interactive plots may not render properly in Colab notebooks due to security restrictions imposed by the Colaboratory platform.

Bug fixes
- importing `hypertools` in a notebook no longer creates phantom Python processes, issues warnings when TkInter isn't installed, fails if `matplotlib.pyplot` was imported first, or silently changes the plotting backend (fixes 242)
- creating 3D plots with `hypertools` no longer alters the global `matplotlib.rcParams` object (fixes 243)
- `hypertools` can now be imported for non-plotting-related uses in environments without a compatible GUI without throwing an error
- IPython's TAB-completion no longer triggers a full import of `hypertools` or improperly sets the plotting backend based on the subprocess's environment
- require `scikit-learn<0.24` (full spec: `scikit-learn>=0.19.1,!=0.22,<0.24`) to avoid bug when loading pre-trained `DataGeometry` objects due to renamed sklearn module

0.6.3

dependency-related updates
- allow `scikit-learn>0.22`. `scikit-learn==0.22.0` contains a bug that affects the `CountVectorizer` vocabulary. This has been fixed in `0.23.0`.
- require `umap-learn>=0.4.6`. We previously avoided a bug in `umap-learn<=0.4.5` by installing a pre-release version from GitHub. This has now been fixed in `umap-learn==0.4.6`
- Beginning with `seaborn==0.11.0`, "dark" color palettes are returned in reverse order from how they were previously. This difference in behavior will be reflected in `hypertools`, but we've changed the default `cmap` in `hypertools._shared.helpers.vals2colors` to a non-dark palette for consistent default behavior.
- Added tests for Python 3.8

0.6.2

minor patch that enables dependencies not hosted on PyPI to install properly
- `setup.py`'s setup command is now a custom class that inherits from `setuptools.command.install.install`, runs the regular installation process, then pip-installs UMAP from its GitHub URL at a pre-release commit hash. This is completely equivalent to manually running `pip install git+<URL>`, but takes the burden of having to do so off of end-users.
- removed URL from `requirements.txt`, added a comment in its place
- added `MANIFEST.IN` file to include `requirements.txt`
- updated minimum Python version listed on PyPI page to 3.5 to reflect that Python 3.4 support was dropped in [v0.5.1 (August 2018)](https://github.com/ContextLab/hypertools/releases/tag/v0.5.1)

This version is tagged as `0.6.2` to keep the versioning here and on PyPI consistent. The fix intended to be `0.6.1` was unsuccessful on TestPyPI, and PyPI does not allow removing and reuploading an existing version.

0.6.0

Updates to `hypertools.reduce`
- fixed bug when to passing a dictionary of parameters to the `reduce` argument that would result in those parameters being overwritten
- added some basic support for passing custom embedding models
- added a warning when resolving conflicts between `hypertools` arguments and model-specific arguments
Other changes
- dropped support for Python 2.7
- fixed bug in Travis tests
- replaced depreciated `pandas.DataFrame` method in `hypertools.tools.df2mat`
- require installing UMAP from the [GitHub repository](https://github.com/lmcinnes/umap/tree/5f9488a9540d1e0ac149e2dd42ebf03c39706110) due to bug fix not released yet.
- updated `setup.py` to comply with PEP 508 guidelines for installing external dependencies
- added unit test for `hypertools.reduce` bug fix
- removed some unused imports and commented-out code
- removed outdated pages from readthedocs
- readthedocs build is now Python 3-based
- build folder is ignored by default when installing from GitHub repository in editable mode

0.5.1

+ added flake8 to travis tests
+ refactored some of procrustes function code
+ removed support for python 3.4
+ removed hdbscan from dependencies (still can be used if installed manually)

Code cleanup (thanks dwillmer!):
+ Changed string comparisons from if x is 'str' to if x == 'str'; the former is an identity comparison, not equality. It happens to be true for some strings because of string interning, but == should always be used for normal comparisons.
+ Removed unused arguments from _draw function - return_data and others weren't used in the function body.
+ Removed unreachable code in normalize function (branch criteria could never be True).
+ Separated out the multiply-nested function calls in DataGeometry class for clarity.
+ Changed comparisons of the formif type(x) is list to if isinstance(x, list); The former doesn't return True for subclasses, so isinstance should always be used.
+ Set unused loop variables to _.
+ Removed unused imports.
+ Ensured all imports are at the top of the file (except lazy / circular ones)
+ Ensure 2 blank lines above functions/classes (PEP8), the code looks a bit weird without this.
+ Fixed typo repect -> respect, was copy-pasted in multiple docstrings.
+ Removed redundant pass before error raise

Page 1 of 4

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.