-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #51 from EcoJulia/rr/phylo
Fix type issues in Phylo extension
- Loading branch information
Showing
39 changed files
with
896 additions
and
732 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,20 @@ | ||
module DiversityAxisArraysExt | ||
|
||
isdefined(Base, :get_extension) ? (using AxisArrays) : (using ..AxisArrays) | ||
using Diversity | ||
|
||
import Diversity: GeneralTypes | ||
function GeneralTypes(zmatrix::AM) where | ||
{FP <: AbstractFloat, M <: AbstractMatrix{FP}, LR, LC, NAMES, | ||
T <: Tuple{Axis{LR, NAMES}, Axis{LC, NAMES}}, | ||
AM <: AxisMatrix{FP, M, T}} | ||
import Diversity | ||
|
||
function Diversity.GeneralTypes(zmatrix::AM) where | ||
{FP <: AbstractFloat, M <: AbstractMatrix{FP}, LR, LC, NAMES, | ||
T <: Tuple{Axis{LR, NAMES}, Axis{LC, NAMES}}, | ||
AM <: AxisMatrix{FP, M, T}} | ||
size(zmatrix, 1) == size(zmatrix, 2) || | ||
throw(DimensionMismatch("Similarity matrix is not square")) | ||
throw(DimensionMismatch("Similarity matrix is not square")) | ||
|
||
AxisArrays.axes(zmatrix, 1).val == AxisArrays.axes(zmatrix, 2).val || | ||
throw(DimensionMismatch("Similarity matrix does not have matching row and column labels")) | ||
throw(DimensionMismatch("Similarity matrix does not have matching row and column labels")) | ||
|
||
return GeneralTypes(zmatrix, collect(AxisArrays.axes(zmatrix, 1).val)) | ||
return Diversity.GeneralTypes(zmatrix, | ||
collect(AxisArrays.axes(zmatrix, 1).val)) | ||
end | ||
|
||
end |
This file contains 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
Oops, something went wrong.
cf827ee
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JuliaRegistrator register
cf827ee
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Registration pull request created: JuliaRegistries/General/104905
Tip: Release Notes
Did you know you can add release notes too? Just add markdown formatted text underneath the comment after the text
"Release notes:" and it will be added to the registry PR, and if TagBot is installed it will also be added to the
release that TagBot creates. i.e.
To add them here just re-invoke and the PR will be updated.
Tagging
After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.
This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via: