diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2013-04-06 07:42:08 -0700 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2013-04-06 07:42:08 -0700 |
commit | 49a8902a673d6fb2ba9ca446fc652aa9d2e55e1b (patch) | |
tree | e71c0d8f6123307860a58796ed840bf32526b3fe /numpy/ma/core.py | |
parent | 3c8fc14665548c71a9cd144b2e16d9309a92e255 (diff) | |
parent | 4394515cd5632a7f110993ff75033d407d10861d (diff) | |
download | numpy-49a8902a673d6fb2ba9ca446fc652aa9d2e55e1b.tar.gz |
Merge pull request #3191 from charris/2to3-apply-imports-fixer
2to3: Apply `imports` fixer.
Diffstat (limited to 'numpy/ma/core.py')
-rw-r--r-- | numpy/ma/core.py | 42 |
1 files changed, 21 insertions, 21 deletions
diff --git a/numpy/ma/core.py b/numpy/ma/core.py index 3c7206e1c..64cfafe7c 100644 --- a/numpy/ma/core.py +++ b/numpy/ma/core.py @@ -22,6 +22,23 @@ Released for unlimited redistribution. # pylint: disable-msg=E1002 from __future__ import division, absolute_import +import sys +import warnings + +import numpy as np +import numpy.core.umath as umath +import numpy.core.numerictypes as ntypes +from numpy import ndarray, amax, amin, iscomplexobj, bool_ +from numpy import array as narray +from numpy.lib.function_base import angle +from numpy.compat import getargspec, formatargspec +from numpy import expand_dims as n_expand_dims + +if sys.version_info[0] >= 3: + from functools import reduce + import pickle +else: + import cPickle as pickle __author__ = "Pierre GF Gerard-Marchant" __docformat__ = "restructuredtext en" @@ -69,23 +86,6 @@ __all__ = ['MAError', 'MaskError', 'MaskType', 'MaskedArray', 'var', 'where', 'zeros'] -import cPickle - -import numpy as np -from numpy import ndarray, amax, amin, iscomplexobj, bool_ -from numpy import array as narray - -import numpy.core.umath as umath -from numpy.lib.function_base import angle -import numpy.core.numerictypes as ntypes -from numpy.compat import getargspec, formatargspec -from numpy import expand_dims as n_expand_dims -import warnings - -import sys -if sys.version_info[0] >= 3: - from functools import reduce - MaskType = np.bool_ nomask = MaskType(0) @@ -7037,7 +7037,7 @@ def dump(a, F): """ if not hasattr(F, 'readline'): F = open(F, 'w') - return cPickle.dump(a, F) + return pickle.dump(a, F) def dumps(a): """ @@ -7052,7 +7052,7 @@ def dumps(a): returned. """ - return cPickle.dumps(a) + return pickle.dumps(a) def load(F): """ @@ -7076,7 +7076,7 @@ def load(F): """ if not hasattr(F, 'readline'): F = open(F, 'r') - return cPickle.load(F) + return pickle.load(F) def loads(strg): """ @@ -7094,7 +7094,7 @@ def loads(strg): dumps : Return a string corresponding to the pickling of a masked array. """ - return cPickle.loads(strg) + return pickle.loads(strg) ################################################################################ def fromfile(file, dtype=float, count= -1, sep=''): |