Skip to content

DOC: Add missing signature from nditer docstring#15877

Merged
eric-wieser merged 1 commit intonumpy:masterfrom
eric-wieser:add-nditer-signature
Mar 31, 2020
Merged

DOC: Add missing signature from nditer docstring#15877
eric-wieser merged 1 commit intonumpy:masterfrom
eric-wieser:add-nditer-signature

Conversation

@eric-wieser
Copy link
Copy Markdown
Member

No description provided.


add_newdoc('numpy.core', 'nditer',
"""
nditer(op, flags=None, op_flags=None, op_dtypes=None, order='K', casting='safe', op_axes=None, itershape=(), buffersize=0)
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.

Suggested change
nditer(op, flags=None, op_flags=None, op_dtypes=None, order='K', casting='safe', op_axes=None, itershape=(), buffersize=0)
nditer(op, flags=None, op_flags=None, op_dtypes=None, order='K', casting='same_kind', op_axes=None, itershape=None, buffersize=0)

Seems itershape None is also supported, so maybe nicer (OTOH its not documented below). I was wondering if we break the long line here, but seems we do not always, so fine to not do it.

So maybe we can just put it in as is, go ahead and merge yourself with or without the suggestion.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I prefer showing (), since that also gives a clue about the type of the argument. Supporting None as an alias of an empty tuple seems weird to me, and I'm wondering how noisy it would be to deprecate it...

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This spawned #15881 and #15882

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

xref #15885

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants