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

Deprecate vectorized real methods in favor of compact broadcast syntax #18513

Closed
wants to merge 1 commit into from

Conversation

Sacha0
Copy link
Member

@Sacha0 Sacha0 commented Sep 14, 2016

This PR deprecates all (?) remaining vectorized real methods (excepting those for SparseVectors, separate PR) in favor of compact broadcast syntax. Ref. #16285, #17302, #18495, and #18512. Best!

As with earlier PRs in this series, to work around #18462 I made the Broadcast module import rather than export broadcast. Will correct this if / when a better solution for #18462 appears.

@kshyatt kshyatt added the broadcast Applying a function over a collection label Sep 15, 2016
@TotalVerb
Copy link
Contributor

Are you planning to do imag and complex as well?

@TotalVerb
Copy link
Contributor

Also, #8759 and #15546 are relevant here. These methods are alias-stable but the behaviour (to alias the original array) is distinct from that typically expected from broadcast.

@deprecate real(D::Diagonal) real.(D)
@deprecate real(M::Bidiagonal) real.(M)
@deprecate real(M::Tridiagonal) real.(M)
@deprecate real(M::SymTridiagonal) real.(M)
Copy link
Contributor

Choose a reason for hiding this comment

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

aren't these AbstractArray subtypes?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good catch! Those deprecations are redundant, the result of mechanical rather than thoughtful work. Simplifying. Thanks!

@Sacha0
Copy link
Member Author

Sacha0 commented Sep 16, 2016

Are you planning to do imag and complex as well?

My immediate targets are float, big, real, imag, complex, and abs. Then once #16986 hits, round, trunc, ceil, floor, and mod. Can you think of others? I discover more as I go.

Perhaps I should open an issue tracking devectorization targets / efforts? Thanks!

@Sacha0
Copy link
Member Author

Sacha0 commented Sep 16, 2016

Also, #8759 and #15546 are relevant here. These methods are alias-stable but the behaviour (to alias the original array) is distinct from that typically expected from broadcast.

Ref. ongoing discussion in #18495. Best!

@Sacha0
Copy link
Member Author

Sacha0 commented Dec 24, 2016

Closing per discussion in #18495 (comment). Best!

@Sacha0 Sacha0 closed this Dec 24, 2016
@Sacha0 Sacha0 deleted the devecreal branch December 24, 2016 00:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
broadcast Applying a function over a collection
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants