summaryrefslogtreecommitdiff
path: root/numpy/core/memmap.py
diff options
context:
space:
mode:
authorTravis Oliphant <oliphant@enthought.com>2008-08-27 14:31:18 +0000
committerTravis Oliphant <oliphant@enthought.com>2008-08-27 14:31:18 +0000
commiteda3f09142f08498f479f6353c5c063ecef4aac0 (patch)
tree390a4bec0155841536b83da26bb5c17860ee6fe6 /numpy/core/memmap.py
parent6aa2c46129ca2e18aa5e720a9a45f8830f1bfb58 (diff)
downloadnumpy-eda3f09142f08498f479f6353c5c063ecef4aac0.tar.gz
Apply modified version of Andrew Dalke's patch in #874 to create a quicker-loading numpy.
Diffstat (limited to 'numpy/core/memmap.py')
-rw-r--r--numpy/core/memmap.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/numpy/core/memmap.py b/numpy/core/memmap.py
index 05aaefef0..dd09b8e28 100644
--- a/numpy/core/memmap.py
+++ b/numpy/core/memmap.py
@@ -1,6 +1,5 @@
__all__ = ['memmap']
-import mmap
import warnings
from numeric import uint8, ndarray, dtype
@@ -173,6 +172,8 @@ class memmap(ndarray):
__array_priority__ = -100.0
def __new__(subtype, filename, dtype=uint8, mode='r+', offset=0,
shape=None, order='C'):
+ # Import here to minimize 'import numpy' overhead
+ import mmap
try:
mode = mode_equivalents[mode]
except KeyError: