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

Why not .* and kron? #2

Open
dlfivefifty opened this issue May 7, 2020 · 5 comments
Open

Why not .* and kron? #2

dlfivefifty opened this issue May 7, 2020 · 5 comments

Comments

@dlfivefifty
Copy link
Member

I’m confused on the roll of this package: why not just use .* (instead of hardamard ) and kron (instead of tensor)?

@timholy
Copy link
Member

timholy commented May 7, 2020

This package is to unicode operators and what IntervalSets.jl was intended for ... We'll hope it's easier.

JuliaGraphics/ColorVectorSpace.jl#126

OK to close?

@dlfivefifty
Copy link
Member Author

I get that, the questions was more about the functions themselves. Eg why not

hardamard!(dest, A, B) = broadcast!(*, dest, A, B)

(I guess with bounds checking to prohibit vector special cases)

@timholy
Copy link
Member

timholy commented May 7, 2020

Yep. Also more compiler-friendly. (broadcast is expensive.) But this seems a question about implementation rather than purpose, and of course we'd be happy to have improved implementations.

@dlfivefifty
Copy link
Member Author

For custom arrays (like BandedMatrix) broadcast will likely be faster than using indexing so a more sensible default

@timholy
Copy link
Member

timholy commented May 7, 2020

Fair enough. PR would be fine.

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

No branches or pull requests

2 participants