Skip to content

Add docstring to ParametricUMAP placeholder class for better documentation#1276

Draft
Lang-Qiu wants to merge 1 commit into
lmcinnes:masterfrom
Lang-Qiu:auto-pr/docstrings-1780779604
Draft

Add docstring to ParametricUMAP placeholder class for better documentation#1276
Lang-Qiu wants to merge 1 commit into
lmcinnes:masterfrom
Lang-Qiu:auto-pr/docstrings-1780779604

Conversation

@Lang-Qiu

@Lang-Qiu Lang-Qiu commented Jun 6, 2026

Copy link
Copy Markdown

Problem

The ParametricUMAP class in umap/__init__.py, which serves as a placeholder when TensorFlow is not installed, was missing a docstring. This reduced code readability and made it harder for users to understand its purpose and error handling.

Solution

Added a comprehensive docstring to the ParametricUMAP class. The docstring includes:

  • A clear description of the class's role as a placeholder when TensorFlow is unavailable.
  • Usage examples to help users handle import scenarios gracefully.
  • References to related functions (e.g., load_ParametricUMAP) for better discoverability.

Verification

  • Review the updated __init__.py file to confirm the docstring is present and correctly formatted.
  • Run existing tests to ensure no functional changes or regressions (e.g., python -m pytest in the repository).
  • Check that the class's behavior remains unchanged: it should still warn and raise an ImportError when instantiated without TensorFlow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants