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

Add diagm for vectors #31125

Merged
merged 8 commits into from
Mar 1, 2019
Merged

Add diagm for vectors #31125

merged 8 commits into from
Mar 1, 2019

Conversation

eulerkochy
Copy link
Contributor

This in reference to JuliaLang/LinearAlgebra.jl#609 . I've added the missing function definition.

Copy link
Member

@StefanKarpinski StefanKarpinski left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution! This should also add a test for the method, checking that it works as expected as well as documentation and a NEWS entry.

stdlib/LinearAlgebra/src/dense.jl Outdated Show resolved Hide resolved
stdlib/LinearAlgebra/src/dense.jl Outdated Show resolved Hide resolved
base/dict.jl Outdated Show resolved Hide resolved
@StefanKarpinski StefanKarpinski added needs docs Documentation for this change is required needs news A NEWS entry is required for this change linear algebra Linear algebra feature Indicates new feature / enhancement requests labels Feb 20, 2019
@eulerkochy
Copy link
Contributor Author

I've removed the un-necessary commit from the branch!

base/dict.jl Outdated Show resolved Hide resolved
@StefanKarpinski
Copy link
Member

At this point I would just do git fetch to pull the latest master and then git reset origin/master and edit the code until the diff looks the way you want it to. This is a small change and the git gymnastics required to do this via commits and rebasing aren't really worth it.

@eulerkochy
Copy link
Contributor Author

Is it fine now?

@KristofferC
Copy link
Member

Is it fine now?

If you look at https://github.com/JuliaLang/julia/pull/31125/files you can see that many irrelevant files seems to have been deleted in this PR. There is also still no test added.

@eulerkochy
Copy link
Contributor Author

eulerkochy commented Feb 21, 2019

Tests as in documented examples of the function call? If so, what's the format to be followed?

@KristofferC
Copy link
Member

Tests as in testing the functionality of the new feature (using the @test macro), see e.g. https://github.com/JuliaLang/julia/blob/master/CONTRIBUTING.md#writing-tests.

Also we could update all the instances of syntax like diagm(0 => D.diag) in the code to use diagm(D.diag) instead.

@eulerkochy
Copy link
Contributor Author

eulerkochy commented Feb 21, 2019

Interesting! But can I make a separate PR for that? This PR has too clumsy for a lapse on my part and I'm not proud of this fact. :(

@KristofferC
Copy link
Member

Sure, that can very well be in another PR.

@eulerkochy
Copy link
Contributor Author

Ok, what's left to do in this PR? Can anyone tell? @KristofferC @StefanKarpinski

@pkofod
Copy link
Contributor

pkofod commented Feb 27, 2019

Ok, what's left to do in this PR? Can anyone tell? @KristofferC @StefanKarpinski

No need to ping when people are already in the conversation :)

I did note the conversation above, but would it really be such a hassle to simply include the tests in this PR? It's easier to find at a later point if it's in the same PR, and you'll actually be 110% confident that your changes work as intended. Even the smallest changes can have unintended consequences, so it's just good practice IMO. I get the eagerness to have the PR merged, but honestly, there's not going to be a new release of Julia tomorrow (I don't think there is at least ! ) so if this is merged now or if it's merged three days from now WITH tests really doesn't matter from an end-users perspective - so I'd say the latter (wait and merge with tests) makes sense. Even for such a "simple" (though appreciated) PR.

@eulerkochy
Copy link
Contributor Author

Thanks for the advice, and well I was just curious to know what remaining work was left so that I could complete it. Seems like to add tests for it!

@eulerkochy
Copy link
Contributor Author

Just trying to reopen!

@StefanKarpinski
Copy link
Member

Getting there!

NEWS.md Outdated Show resolved Hide resolved
@StefanKarpinski StefanKarpinski removed needs docs Documentation for this change is required needs news A NEWS entry is required for this change labels Feb 28, 2019
StefanKarpinski and others added 2 commits February 28, 2019 22:39
As per review.

Co-Authored-By: eulerkochy <kc99.kol@gmail.com>
Copy link
Member

@StefanKarpinski StefanKarpinski left a comment

Choose a reason for hiding this comment

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

Looking good. Glad you stuck it out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Indicates new feature / enhancement requests linear algebra Linear algebra
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants