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

small fix to doc for linspace #14526

Closed
wants to merge 2 commits into from
Closed

Conversation

jverzani
Copy link
Member

@jverzani jverzani commented Jan 1, 2016

linspace is defined https://github.com/JuliaLang/julia/blob/master/base/range.jl#L235 to have a default of n=50 points, not n=100. Not sure if I need to do more for this.

linspace is defined https://github.com/JuliaLang/julia/blob/master/base/range.jl#L235 to have a default of n=50 points, not n=100. Not sure if I need to do more for this.
@ViralBShah
Copy link
Member

I wonder if 100 should be the real default in the code instead.

@tkelman
Copy link
Contributor

tkelman commented Jan 1, 2016

Also needs to be changed in the corresponding rst signature. Thanks!

@jverzani
Copy link
Member Author

jverzani commented Jan 1, 2016

Okay, I updated the .rst file. Is there some way to squash commits through the GitHub interface? I too think the default should be 100 and not 50, as that is the MATLAB users expectation, but this just changes the docs to match the code.

@KristofferC
Copy link
Member

FWIW numpy uses default = 50.

@nalimilan
Copy link
Member

I would just deprecate the method with the default value, as it makes the code harder to understand given that the default is totally arbitrary and changes depending on the language.

@KristofferC
Copy link
Member

I think most codes that use linspace without specifying a value don't really care if the default is 100 or 50. Usually you just use it if you want a "somewhat fine" discretisation of an interval for, e.g for plotting. -1 for deprecating it.

@ViralBShah
Copy link
Member

I tried to squash, but ended up creating a new PR (#14528). Closing this and will merge the other one.

@ViralBShah ViralBShah closed this Jan 1, 2016
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.

5 participants