10000 DOC: core: contents of newly allocated space in memmap by larsmans · Pull Request #5176 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

DOC: core: contents of newly allocated space in memmap #5176

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

Merged
merged 1 commit into from
Oct 12, 2014

Conversation

larsmans
Copy link
Contributor

Fixes #5157.

When a memmap causes a file to be created or extended beyond its
current size in the filesystem, the contents of the new part are
unspecified. On systems with POSIX filesystem semantics, NumPy
tries to fill the extended part with zero bytes.
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd remove numpy from this sentence, numpy doesn't do anything with the memory, it accepts it as given by the OS
Otherwise it might imply numpy actually writes zeros, which it does and must not do.

Copy link
Member

Choose a reason for hiding this comment

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

@juliantaylor: numpy.memmap explicitly zero-pads the opened file to
the specified size:
https://github.com/numpy/numpy/blob/master/numpy/core/memmap.py#L242

Copy link
Contributor

Choose a reason for hiding this comment

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

that is no explicit zeropad it assumes the filesystem does the zeropadding, which it may not if its not posix compliant

Copy link
Member

Choose a reason for hiding this comment

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

It is explicit zero padding on POSIX. The above docstring explicitly
mentions this.

Copy link
Contributor

Choose a reason for hiding this comment

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

yes, I just want the word numpy removed because its not numpy doing it.

Copy link
Member

Choose a reason for hiding this comment

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

No objection, I see what you mean. (The mails github sends don't
contain the revisions to the comments, so I didn't get your point
before reading the web version...)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok, I'll remove it.

@larsmans
Copy link
Contributor Author

Pushed a new version.

@juliantaylor
Copy link
Contributor

thanks

juliantaylor added a commit that referenced this pull request Oct 12, 2014
DOC: core: contents of newly allocated space in memmap
@juliantaylor juliantaylor merged commit 2ba94e7 into numpy:master Oct 12, 2014
@larsmans larsmans deleted the memmap-doc branch April 28, 2016 14:26
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.

memmap docstring doesn't say how a new mapping is filled
3 participants
0