Repository navigation
Conversation
Member
There was a problem hiding this comment.
is this really where the .. versionadded: goes? it seems counter-intuitive to me but I'm not sure how to check.
Member
There was a problem hiding this comment.
I don't think we've documented versionadded for the case of adding a single parameter, but this is where it normally goes.
The linspace corner cases always returned float, but the rest of the function did support complex or high precision floating point numbers.
This adds a step argument to linspace, however the step argument is only used to determine the integer number of steps. It must be possible to safely determine the number of steps (given floating point accuracy), otherwise an error raised. This means it cannot be used when start, stop or step are inaccurate due to previous calculations. This was requested in numpygh-630.
Member
Author
|
I updated this code, still not sure if it is worth it to provide such a parameter though. |
Member
|
I don't recall if this was discussed on the list or not. |
Member
Author
|
Ah well... closing this until I figured out how to do it less strict... if anyone stumbles on it and has an idea please feel free to post it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds a step argument to linspace, however the step argument is only used to determine the integer number of steps. It must be possible to safely determine the number of steps (given floating point accuracy). This was requested in gh-630. Also fixes corner cases where the dtype was not preserved, even though the function supports complex numbers fine.
I kind of like the functionality, but it seems to me like a pure convenience function that, in general code maybe fails unexpectedly (i.e. given very large floats or such), or maybe even works on one computer and not on the next in some examples.