-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
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
Conversation
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. |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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...)
There was a problem hiding this comment.
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.
Pushed a new version. |
thanks |
DOC: core: contents of newly allocated space in memmap
Fixes #5157.