docs: update demo and fix matrix input in pairwise_distances#55
Merged
Neclow merged 2 commits intosbhattlab:mainfrom May 25, 2025
Merged
docs: update demo and fix matrix input in pairwise_distances#55Neclow merged 2 commits intosbhattlab:mainfrom
Neclow merged 2 commits intosbhattlab:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR updates the documentation demo and fixes input handling in the pairwise_distances function to properly accept both vectors and matrices while bumping the package version.
- Update pairwise_distances function to validate for both vectors (ndim == 1) and matrices (ndim == 2).
- Adjust documentation demo output and execution counts.
- Bump version in Cargo.toml to reflect the update.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| py-phylo2vec/phylo2vec/metrics/pairwise.py | Updated function parameter validation and docstring for pairwise_distances |
| py-phylo2vec/Cargo.toml | Bumped package version from 1.2.0 to 1.2.1 |
| docs/demo.ipynb | Updated demo notebook cells and outputs to reflect changes in functionality |
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR fixes issue #42 by updating the type annotations and documentation to ensure that the functions properly accept both vectors and matrices, including an enhanced input check in the pairwise_distances function. It also bumps the package version in Cargo.toml.
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| py-phylo2vec/phylo2vec/metrics/pairwise.py | Updated parameter name and added matrix check for pairwise distances. |
| py-phylo2vec/phylo2vec/io/writer.py | Updated parameter type annotation in docstring. |
| py-phylo2vec/phylo2vec/base/pairs.py | Updated docstrings to reflect tuple representation and np.ndarray type. |
| py-phylo2vec/phylo2vec/base/newick.py | Updated parameter type annotation in docstring. |
| py-phylo2vec/phylo2vec/base/edges.py | Updated parameter type annotation in docstring. |
| py-phylo2vec/phylo2vec/base/ancestry.py | Updated parameter and return types to np.ndarray. |
| py-phylo2vec/Cargo.toml | Bumped the package version from 1.2.0 to 1.2.1. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #42 and fixes the input for "pairwises_ditsances" (only accepted vectors, not matrices)
Bump python version: 1.2.0 --> 1.2.1