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/__init__.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/__init__.py')
| -rw-r--r-- | numpy/__init__.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/numpy/__init__.py b/numpy/__init__.py index 9cae9d388..f8c1de5ce 100644 --- a/numpy/__init__.py +++ b/numpy/__init__.py @@ -106,6 +106,8 @@ Exceptions to this rule are documented. """ from __future__ import division, absolute_import +import sys + # We first need to detect if we're being called as part of the numpy setup # procedure itself in a reliable manner. try: @@ -160,8 +162,11 @@ else: # Make these accessible from numpy name-space # but not imported in from numpy import * - from __builtin__ import bool, int, long, float, complex, \ - object, unicode, str + if sys.version_info[0] >= 3: + from builtins import bool, int, long, float, complex, object, unicode, str + else: + from __builtin__ import bool, int, long, float, complex, object, unicode, str + from .core import round, abs, max, min __all__.extend(['__version__', 'pkgload', 'PackageLoader', |
