Skip to content

ENH: add keyword nrows to genfromtxt, closes #5084 - #5093

Closed
syrte wants to merge 2 commits into
numpy:masterfrom
syrte:master
Closed

syrte wants to merge 2 commits into
numpy:masterfrom
syrte:master

Conversation

@syrte

@syrte syrte commented Sep 21, 2014

Copy link
Copy Markdown
Contributor

Add keyword nrows to specify the number of rows to read.

  1. We should not use keywords nrows and skip_footer in the same time. (As skip_footer require loading of the whole file, it seems a bit waste when we have already specified the number of rows to read. And the process for invalid value would be more complex with skip_footer.)
  2. If there's not enough rows (less than nrows) to read, an exception would raise.

Add tests for the new behavior.

@syrte syrte changed the title Update function genfromtxt: add keywords nrows Update function genfromtxt: add keyword nrows Sep 21, 2014
@jaimefrio

Copy link
Copy Markdown
Member

I think the code is ready to go, although some other eyes are welcome!

There are a few issues though before we can merge this:

  • You are working from the master branch of your forked repository. That is not the way we do things around here! You should be working on a feature branch, take a look at the development workflow docs, more specifically here.
  • Commit messages should also follow the guidelines here, this one should probably be something like ENH: add keyword nrowstogenfromtxt, closes #5084

On a separate note, you didn't have to close #5090 and send a new PR, just push a new commit to your repository. That makes it easier to follow the discussion for others. Although you probably will have to create a new PR to fix the branch issue on this one.

Comment thread numpy/lib/npyio.py Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this still needs a

.. versionadded:: 1.10.0

after the description separated by a newline, see e.g. percentile docstring in 1.9

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

also replace should not with must not be used

@njsmith

njsmith commented Sep 21, 2014

Copy link
Copy Markdown
Member

I don't think we actually care about the feature branch thing -
understanding how to use feature branches is a good idea because they make
life easier when writing the code (esp. when you have more than one
change at different stages of progress), but from the reviewer's
perspective it doesn't make a difference, so there's no need to fix it here
unless you want to.
On 21 Sep 2014 15:26, "Jaime" [email protected] wrote:

I think the code is ready to go, although some other eyes are welcome!

There are a few issues though before we can merge this:

You are working from the master branch of your forked repository. That
is not the way we do things around here! You should be working on a feature
branch, take a look at the development workflow docs
http://docs.scipy.org/doc/numpy/dev/gitwash/development_workflow.html,
more specifically here
http://docs.scipy.org/doc/numpy/dev/gitwash/development_workflow.html#making-a-new-feature-branch
.

Commit messages should also follow the guidelines here
http://docs.scipy.org/doc/numpy/dev/gitwash/development_workflow.html#writing-the-commit-message,
this one should probably be something like ENH: add keyword nrows to
genfromtxt, closes #5084

On a separate note, you didn't have to close #5090
#5090 and send a new PR, just push a
new commit to your repository. That makes it easier to follow the
discussion for others. Although you probably will have to create a new PR
to fix the branch issue on this one.

—
Reply to this email directly or view it on GitHub
#5093 (comment).

@charris

charris commented Sep 21, 2014

Copy link
Copy Markdown
Member

I don't think we actually care about the feature branch thing

It does cause problems long term in keeping the local master in sync with upstream. The best way to do that is to only update master from upstream. For a one-off PR, it doesn't really matter, but hopefully new contributors will make more than one PR .

@syrte syrte changed the title Update function genfromtxt: add keyword nrows ENH: add keyword nrows to genfromtxt, closes #5084 Sep 23, 2014
@syrte

syrte commented Sep 23, 2014

Copy link
Copy Markdown
Contributor Author

@jaimefrio

You are working from the master branch of your forked repository. That is not the way we do things around here! You should be working on a feature branch, take a look at the development workflow docs, more specifically here.

Thanks for your comments. I'm not familar with github workflow, I'll follow the guide the next time.
And, what can I do for this PR? Can I change it to feature branch or something?

@jaimefrio

Copy link
Copy Markdown
Member

Closing this. The fun continues in #5103 and the mailing list.

@jaimefrio jaimefrio closed this Sep 24, 2014
charris pushed a commit to charris/numpy that referenced this pull request Jan 24, 2015
This allows one to specify the maximum number of row processed in
in a call. The new functionality allows for reading more complex
data formats. For instance, multiple calls can be used to read in
multiple arrays stored in a single file.

Closes numpy#5084.
Closes numpy#5093.
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