]]]]in [ ]del mmap whenever memory map falls out of scope and is garbage-collectedany changes will be flushed to disk also when opening an existing memory mapyou still have to specify the dtype and shape as the file is just block of binary data with no metadata on diskin [ ]mmap np memmap('mymmap'dtype='float 'shape=( )in [ ]mmap out[ ]memmap([[- - - - - ] - - - - ][- - - - ] ] ] ]]since memory map is just an on-disk ndarraythere are no issues using structured dtype as described above hdf and other array storage options pytables and py are two python projects providing numpy-friendly interfaces for storing array data in the efficient and compressible hdf format (hdf stands for hierarchical data formatyou can safely store hundreds of gigabytes or even terabytes of data in hdf format the use of these libraries is unfortunately outside the scope of the book pytables provides rich facility for working with structured arrays with advanced querying features and the ability to add column indexes to accelerate queries this is very similar to the table indexing capabilities provided by relational databases performance tips getting good performance out of code utilizing numpy is often straightforwardas array operations typically replace otherwise comparatively extremely slow pure python loops here is brief list of some of the things to keep in mindconvert python loops and conditional logic to array operations and boolean array operations use broadcasting whenever possible avoid copying data using array views (slicingutilize ufuncs and ufunc methods advanced numpy www it-ebooks info