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

Remove rref #9804

Merged
merged 1 commit into from
Jan 19, 2015
Merged

Remove rref #9804

merged 1 commit into from
Jan 19, 2015

Conversation

andreasnoack
Copy link
Member

I don't think this function is useful in base. Better to use \.

See #7692

@dhoegh
Copy link
Contributor

dhoegh commented Jan 16, 2015

From an implementations point of view it's not necessary but I remember that way back when I had linear algebra I used 'rref' for cross checking the results.

@andreasnoack
Copy link
Member Author

But couldn't you have used \ for that?

@dhoegh
Copy link
Contributor

dhoegh commented Jan 17, 2015

Yes you can, rref is just a referenced in my linealgebra books. I can see that numpy do not supply it either, so I think it's ok to not follow Matlab here:)

andreasnoack added a commit that referenced this pull request Jan 19, 2015
@andreasnoack andreasnoack merged commit f9792e7 into master Jan 19, 2015
@andreasnoack andreasnoack deleted the anj/rref branch January 19, 2015 14:14
@bosmacs
Copy link

bosmacs commented Mar 4, 2015

Couldn't this have been left in Base but not exported? I have found it useful at times for checking my work; for example when finding eigenvectors by hand. Maybe not a compelling use case, but I'm sorry to see it removed altogether.

@andreasnoack
Copy link
Member Author

I don't like that solution. The function is mainly relevant for interactive use so it wouldn't make sense not to export it.

I don't think this function use useful enough for inclusion in base. It can be nice to confirm that a result derived by hand is correct, but I don't see that as enough. In particular when there are other and better functions available. Why not use eig or eigfact for check your vectors?

@bosmacs
Copy link

bosmacs commented Mar 5, 2015

I thought you could still manually import unexported functions in an interactive session? I chose this one at random:

julia> serialize_array_data
ERROR: UndefVarError: serialize_array_data not defined

julia> import Base.serialize_array_data

julia> serialize_array_data
serialize_array_data (generic function with 1 method)

Computing eigenvalues was just an example; of course there will always be better ways of checking the final answer, but I see the use of rref in checking intermediate calculations.

I don't mean to belabor the point, just found it somewhat surprising to find it had disappeared.

@andreasnoack
Copy link
Member Author

You can do that, but I'm just arguing that we should decide whether a function like this is worth having in base or not and if it is then export it. A function like serialize_array_data is for mainly, if not only, for internal use and therefore it makes sense not to export it.

We try to ensure that functions included in base have a reasonable documentation and works well and rref had to be fixed, #7692, and the documentation was brief. Therefore I argued that it was better to remove it from base when other functions covered the functionality in, what I considered, a better way.

@tkelman
Copy link
Contributor

tkelman commented Mar 5, 2015

It would be entirely reasonable to take the deleted definition and put it somewhere else, either in your personal code or in a public package, so it can continue to be used by anyone who wants it. https://github.com/andreasnoack/LinearAlgebra.jl perhaps?

@bosmacs
Copy link

bosmacs commented Mar 5, 2015

OK, I see your point about (not) exporting and agree -- it wasn't a well thought out suggestion on my part. So if rref were fixed and better documentation provided, would it be reconsidered for inclusion in Base?

As an aside, besides Matlab there are a number of other systems that include an rref-equivalent by default: Mathematica, Sage, and Maple to name a few.

@tkelman
Copy link
Contributor

tkelman commented Mar 5, 2015

So if rref were fixed and better documentation provided, would it be reconsidered for inclusion in Base?

Maybe. It would be much easier to do that fixing and documentation in a Julia package however, since you wouldn't be as constrained by the development schedule or requirements of base Julia.

@andreasnoack
Copy link
Member Author

I'd be okay with having it in LinearAlgebra.jl but I don't know when I'll have time to make that ready for registration. Right now it is quite experimental.

@shashi
Copy link
Contributor

shashi commented Mar 6, 2015

@alanedelman used rref in the most recent 18.06 homework

@alanedelman
Copy link
Contributor

Right. "rref" has no use in real numerical coding, but every use in pedagogy.
The assertion that someone would use "" instead seems unlikely.

I haven't quite put my finger on this yet, but I have a bad feeling that we as a group
are not recognizing the importance of what I have often called that "first date" experience
with Julia. Loading packages for those first-exposure-functions is a turn off here.

@hayd
Copy link
Member

hayd commented Jun 10, 2015

Also tutorials in Matlab (et al) which use rref don't "just work" in julia, and you are left disappointed that julia can't do that... whereupon Google points you to: this issue.

Of course, having to do using LinearAlgebra would make sense but currently most Linear Algebra things are already in Base...

@tkelman
Copy link
Contributor

tkelman commented Jun 10, 2015

There's definitely an ongoing unresolved tension between the "everything available by default" setup which is ideal for a teaching language and initial usage, vs the "modularity is good, don't pollute the global namespace" best-practices for software engineering and wanting to create large complex systems.

@hayd
Copy link
Member

hayd commented Jun 10, 2015

@tkelman Once there's #8745 (?) then I don't think it would be a ridiculous burden to require using LinAlg to get the kitchen sink, even in interactive use.

@PallHaraldsson
Copy link
Contributor

@hayd @tkelman "Once there's #8745 (?) then" it seems to be merged.

I'm not familiar with this rref, personally, if it is bad to leave it out, I wouldn't mind having it in. I want Julia to succeed for the target (math) audience, mostly because I want Julia to succeed for others and have happy users/critical mass to point to..

I do want to be eventually to not have all the math "baggage".. I think this issue is it:

#5155

@johnmyleswhite
Copy link
Member

@PallHaraldsson: Please be more thoughtful about the commentary you offer. Commentary that you yourself acknowledge is ill-informed harms everyone around you.

@StefanKarpinski
Copy link
Member

I want Julia to succeed for the target (math) audience, mostly because I want Julia to succeed for others and have happy users/critical mass to point to..

These kinds of comments that imply that "if you don't do X thing that I would like, the language will fail with Y audience (that I'm part of)" are particularly reprehensible. They're overstated, melodramatic, and extortionate. If you have a real case to make for something, make it, otherwise be quiet.

@PallHaraldsson
Copy link
Contributor

[Off-topic:]
I was, really, only trying to help in case the person saying "Once there's #8745", had missed a merge, similar to at issue 9352 (that is open with commits not merged) where I got this response: "No, there's nothing automated--thanks for surfacing this."

After seeing from Edelman: "Right. "rref" has no use in real numerical coding, but every use in pedagogy." this seemed like rref being dropped might be a mistake, or at least something should be done to make up for it.

I see your point @StefanKarpinski, it was however not my intention to push anyone to do anything. What I really meant, and should have said, was "I really want Julia to get the recognition that it already deserves". I would be fine with 1.0 right now with NO changes, that would be good enough for many people and I still hear people waiting for that, such as this CS professor I answered here:

https://www.quora.com/Which-programming-language-should-i-learn/answer/Mark-Lewis-8/comment/12898251?__snids__=1344987592&__nsrc__=1&__filter__=all#comment12898307

By looking that link up I surprisingly saw: "You're now a Most Viewed Writer in Julia (programming language)." Hopefully I'm not saying something I shouldn't say.. I try to be careful about not saying to much there about stuff I know less about, only focusing on use of Julia as a general purpose language.

@johnmyleswhite I'm probably ill-informed (I assume you mean because of "not familiar with this rref") and/or was a little hasty answering when I could have stayed quiet, I'm really sorry for the harm.

@StefanKarpinski
Copy link
Member

Recognition will come from making good decisions, not responding to scare-mongering rhetoric.

@hiemstar
Copy link

Could rref be put back in Base until a better location is found? It's one of the most basal linear algebra routines. Perhaps not useful in real computations, reduced row echelon form can reveal important matrix structure and hence is essential in the classroom.

@tkelman
Copy link
Contributor

tkelman commented Feb 18, 2016

Pkg.generate("RowEchelon", "MIT"), add license attribution to the original source, copy-paste and register?

@fiatflux
Copy link

fiatflux commented Mar 6, 2016

I love the drive to reduce the clutter. But I'm teaching linear algebra presently, and I feel it is a real loss that I can't easily point my students to this function in Julia. I strongly agree that this should be in base unless there is a good LinAlg "kitchen sink".

@jverzani
Copy link
Member

jverzani commented Mar 6, 2016

Not sure it is helpful for your class, but maybe worth pointing out that SymPy has an rref function that can be used:

using SymPy
A = Sym[1 2 3; 4 5 6; 7 8 9]
rref(A)

Since there is (now) no conflict with Base.rref, this method could also be extended to work with matrices beyond symbolic ones.

@StefanKarpinski
Copy link
Member

How about making it an extra credit assignment for one of your students to dig up the old code for rref and making a RowEchelon Julia package that contains that code?

@fiatflux
Copy link

fiatflux commented Mar 7, 2016

Thanks for the pointer to SymPy!

@blegat
Copy link
Contributor

blegat commented Oct 1, 2016

I made that package RowEchelon.jl.
@andreasnoack when LinearAlgebra.jl is ready to be registered, tell me and I will delete RowEchelon.jl to add it into your package as this makes more sense.

@andreasnoack
Copy link
Member Author

Sure. Feel free to open an issue at LinearAlgebra.jl such that we don't forget it.

@monsij
Copy link

monsij commented Mar 28, 2017

@blegat Hello there,I'm Monsij.Seeing the possibilities Julia Lang possesses within it,I want to contribute to make it even more diverse.Please guide me in this regard.It will be really helpful for me

@miguelraz
Copy link
Contributor

@monsij Perhaps start here

@monsij
Copy link

monsij commented Mar 28, 2017

@miguelraz Thank you very much!!

@monsij
Copy link

monsij commented Mar 28, 2017

Can someone please help me to install the packages from Windows command line.I want to implement rref functionality. It's showing non registered beside every package name when I query Pkg.status().I have installed them manually

@monsij
Copy link

monsij commented Mar 28, 2017

Curently it's showing UndefVarError: rref not defined

@tkelman
Copy link
Contributor

tkelman commented Mar 28, 2017

Please use https://discourse.julialang.org for questions.

@blegat
Copy link
Contributor

blegat commented Mar 28, 2017

@monsij You can open an issue on https://github.com/blegat/RowEchelon.jl to discuss about the functionality you want to add ;)

@alkeldi
Copy link

alkeldi commented Oct 13, 2020

Sure. Feel free to open an issue at LinearAlgebra.jl such that we don't forget it.

@andreasnoack
Is there a reason rref is still not part of LinearAlgebra.jl ?

@andreasnoack
Copy link
Member Author

Is there a reason rref is still not part of LinearAlgebra.jl ?

Nobody has implemented it. If somebody prepares a PR (and gives it a better name than rref) then I'll be happy to merge it. Please continue the discussion in the GenericLinearAlgebra.jl repo if necessary.

@pranshumalik14
Copy link

@andreasnoack I don't understand what's missing in rref implementation at https://github.com/blegat/RowEchelon.jl. Also, "rref" is an acronym for a standard term in linear algebra, so I am not sure why you want a new name for it.

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.