[Numpy-discussion] memmap, write through and flush
Thu Aug 13 00:36:00 CDT 2009
> 2009/8/12 Robert Kern <firstname.lastname@example.org>:
> On Sat, Aug 8, 2009 at 21:33, Tom Kuiper<email@example.com> wrote:
>> There is something curious here. The second flush() fails. Can anyone
>> explain this?
> numpy.append() does not append values in-place. It is just a
> convenience wrapper for numpy.concatenate().
Meaning that a copy of the data is returned in an ndarray, so when you do
fp = np.append(fp, [[12,13,14,15]], 0)
The name fp is no longer bound to a memmap, hence
AttributeError: 'numpy.ndarray' object has no attribute 'flush'
More information about the NumPy-Discussion