Skip to content

get rid of old typealiases #840

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Dec 6, 2022
Merged

Conversation

KristofferC
Copy link
Member

@KristofferC KristofferC commented Nov 21, 2022

As the comment in common.jl says, these are obsolete now with the terse covariant syntax.

Interestingly, there is apparently a whole package just for these type alises: https://github.com/AP6YC/NumericalTypeAliases.jl/blob/develop/README.md#aliases.

Copy link
Member

@ararslan ararslan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for doing this! Though clearly the proper fix would have been to take a dependency on NumericalTypeAliases. :trollface:

@@ -7,7 +7,7 @@ The package provides functions to count the occurrences of distinct values.
```@docs
counts
proportions
addcounts!(r::AbstractArray, x::StatsBase.IntegerArray, levels::StatsBase.IntUnitRange)
addcounts!(r::AbstractArray, x::StatsBase.AbstractArray{<:Integer}, levels::StatsBase.IntUnitRange)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
addcounts!(r::AbstractArray, x::StatsBase.AbstractArray{<:Integer}, levels::StatsBase.IntUnitRange)
addcounts!(r::AbstractArray, x::AbstractArray{<:Integer}, levels::StatsBase.IntUnitRange)

I guess IntUnitRange could be similarly removed, as it's an alias for UnitRange{<:Integer}.

@@ -69,7 +69,7 @@ percentile
iqr
nquantile
quantile
Statistics.median(v::StatsBase.RealVector, w::AbstractWeights{<:Real})
Statistics.median(v::StatsBase.AbstractVector{<:Real}, w::AbstractWeights{<:Real})
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Statistics.median(v::StatsBase.AbstractVector{<:Real}, w::AbstractWeights{<:Real})
Statistics.median(v::AbstractVector{<:Real}, w::AbstractWeights{<:Real})

@KristofferC
Copy link
Member Author

Updated

@ararslan ararslan merged commit 0b64a9c into JuliaStats:master Dec 6, 2022
yuyichao added a commit to yuyichao/Clustering.jl that referenced this pull request Dec 13, 2022
ararslan pushed a commit to JuliaStats/Clustering.jl that referenced this pull request Dec 14, 2022
kagalenko-m-b pushed a commit to kagalenko-m-b/StatsBase.jl that referenced this pull request Feb 14, 2023
ararslan added a commit to JuliaStats/MLBase.jl that referenced this pull request Aug 17, 2023
* import numerical array types from NumericalTypeAliases and not StatsBase

* add CompatHelper action

* replaced uses of type aliases with their definitions in the same manner as JuliaStats/StatsBase.jl#840

* Include both StatsBase 0.33 and 0.34 in compat

Co-authored-by: Alex Arslan <ararslan@comcast.net>

---------

Co-authored-by: Alex Arslan <ararslan@comcast.net>
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.

2 participants