Skip to content

Update function genfromtxt: add keyword nrows - #5090

Closed
syrte wants to merge 1 commit into
numpy:masterfrom
syrte:patch-1
Closed

syrte wants to merge 1 commit into
numpy:masterfrom
syrte:patch-1

Conversation

@syrte

@syrte syrte commented Sep 20, 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.
  2. If there's not enough lines (less than nrows) to read, an exception would raise.

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. 
2. If there's not enough lines (less than nrows) to read, an exception would raise.
Comment thread numpy/lib/npyio.py

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

You should add new arguments to the end of the function signature, so that you don't break code using positional arguments.

@jaimefrio

Copy link
Copy Markdown
Member

You should also add some tests for the new behavior, to numpy/lib/tests/test_io.py

@syrte

syrte commented Sep 21, 2014

Copy link
Copy Markdown
Contributor Author

Thank you, your comments are to the points. And sorry for my lack of experience and carelessness.

@jaimefrio

Copy link
Copy Markdown
Member

No problem, @styra, your efforts are appreciated and very welcome: don't let these mistakes scare you away from fixing this PR and/or sending more in the future!

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.

2 participants