Skip to content
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

absorb repmat into repeat and deprecate it #26039

Merged
merged 1 commit into from
Feb 14, 2018
Merged

absorb repmat into repeat and deprecate it #26039

merged 1 commit into from
Feb 14, 2018

Conversation

JeffBezanson
Copy link
Member

I think this is a pretty clear improvement, since repmat only implements a very small number of special cases of repeat.

I added the signature repeat(array, n, m, ...) since (1) this is consistent with other repeat methods like repeat(str, n) and (2) this makes it easier to deprecate repmat since repeat(A, outer=(n,m)) is a bit verbose. Then I hooked up repeat(A, outer=...) to call the optimized kernels we have for repmat when possible.

@JeffBezanson JeffBezanson added arrays [a, r, r, a, y, s] deprecation This change introduces or involves a deprecation triage This should be discussed on a triage call labels Feb 13, 2018
@@ -241,14 +241,13 @@ end
## Other array functions ##

"""
repmat(A, m::Integer, n::Integer=1)
repeat(A, counts::Integer...)
Copy link
Member

Choose a reason for hiding this comment

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

Add the constraint that A::AbstractArray?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arrays [a, r, r, a, y, s] deprecation This change introduces or involves a deprecation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants