summaryrefslogtreecommitdiff
path: root/numpy/_import_tools.py
Commit message (Collapse)AuthorAgeFilesLines
* 2to3: Apply `repr` fixer.Charles Harris2013-04-081-1/+1
| | | | | | | | | | | | This replaces python backtics with repr(...). The backtics were mostly used to generate strings for printing with a string format and it is tempting to replace `'%s' % repr(x)` with `'%r' % x`. That would work except where `x` happened to be a tuple or a dictionary but, because it would be significant work to guarantee that and because there are not many places where backtics are used, the safe path is to let the repr replacements stand. Closes #3083.
* 2to3: Apply `print` fixer.Charles Harris2013-04-061-6/+6
| | | | | | | Add `print_function` to all `from __future__ import ...` statements and use the python3 print function syntax everywhere. Closes #3078.
* 2to3: Use absolute imports.Charles Harris2013-03-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new import `absolute_import` is added the `from __future__ import` statement and The 2to3 `import` fixer is run to make the imports compatible. There are several things that need to be dealt with to make this work. 1) Files meant to be run as scripts run in a different environment than files imported as part of a package, and so changes to those files need to be skipped. The affected script files are: * all setup.py files * numpy/core/code_generators/generate_umath.py * numpy/core/code_generators/generate_numpy_api.py * numpy/core/code_generators/generate_ufunc_api.py 2) Some imported modules are not available as they are created during the build process and consequently 2to3 is unable to handle them correctly. Files that import those modules need a bit of extra work. The affected files are: * core/__init__.py, * core/numeric.py, * core/_internal.py, * core/arrayprint.py, * core/fromnumeric.py, * numpy/__init__.py, * lib/npyio.py, * lib/function_base.py, * fft/fftpack.py, * random/__init__.py Closes #3172
* 2to3: Put `from __future__ import division in every python file.Charles Harris2013-03-011-0/+2
| | | | | | | | This should be harmless, as we already are division clean. However, placement of this import takes some care. In the future a script can be used to append new features without worry, at least until such time as it exceeds a single line. Having that ability will make it easier to deal with absolute imports and printing updates.
* Merge pull request #3056 from charris/2to3-filterCharles Harris2013-03-011-1/+1
|\ | | | | 2to3: Apply `filter` fixes. Closes #3053.
| * 2to3: Apply `filter` fixes. Closes #3053.Charles Harris2013-02-281-1/+1
| | | | | | | | | | Generally, this involves using list comprehension, or explicit list construction as `filter` is an iterator in Python 3.
* | 2to3: apply exec fixer results.Charles Harris2013-02-281-1/+1
|/ | | | This changes the `exec` command to the `exec` function.
* 2to3: Use modern exception syntax.Charles Harris2013-02-261-3/+3
| | | | Example: except ValueError,msg: -> except ValueError as msg:
* STY: Replace remaining old style classes with classes subclassing object.Charles Harris2011-04-051-1/+1
|
* Removed redundant import.Alan McIntyre2008-09-181-2/+0
|
* Apply modified version of Andrew Dalke's patch in #874 to create a ↵Travis Oliphant2008-08-271-1/+0
| | | | quicker-loading numpy.
* When using PackageLoader, do not add subpackage names to __all__.Robert Kern2008-06-171-4/+1
|
* ran reindentJarrod Millman2008-02-081-2/+2
|
* Improve docstringsTravis Oliphant2007-12-281-17/+12
|
* use 'in' keyword to test dictionary membershipJarrod Millman2007-11-281-5/+5
|
* Fix docstring formatting for PackageLoader classedschofield2007-05-241-7/+8
|
* Add new MACRO. Fix ticket #454 by changing pkgload to a function instead of ↵Travis Oliphant2007-03-311-2/+6
| | | | an object.
* Fix ticket #271 and turn default printing of warnings offTravis Oliphant2006-09-041-2/+2
|
* Trying harder to find info modules.Pearu Peterson2006-03-301-3/+9
|
* Fixed errors when trying to import freezed numpy scripts.Pearu Peterson2006-03-301-2/+5
|
* Run reindent.py (script distributed with Python) over the source to remove ↵cookedm2006-03-101-4/+4
| | | | extraneous whitespace
* Added more debugging hooks to PackageLoader: NUMPY_IMPORT_DEBUG. Avoid ↵Pearu Peterson2006-02-241-0/+14
| | | | initiating Scipy/NumpyTest during imports.
* Fixed pkgload: synced behaviours of postpone and postpone_import flags.Pearu Peterson2006-01-311-2/+3
|
* Making f2py and distutils scipy-style packages. Using pkgload to load numpy ↵Pearu Peterson2006-01-141-3/+3
| | | | packages.
* Improved warning message for non-existing packages in pkgload call.Pearu Peterson2006-01-091-3/+3
|
* Fixed pkgload docs.Pearu Peterson2006-01-091-18/+12
|
* Documenting global_symbols in __doc__ and fixed formatting.Pearu Peterson2006-01-091-4/+27
|
* Fixed missing _obj2str attr bug.Pearu Peterson2006-01-071-2/+2
|
* Impl. get_pkgdocs and cleanup of _import_tools.Pearu Peterson2006-01-051-145/+43
|
* Added i0 natively for kaiser windowTravis Oliphant2006-01-051-2/+2
|
* Restore _import_tools.py.Pearu Peterson2006-01-051-0/+413
|
* Removed pkgload from numpy - all imports can be done explicitly.Pearu Peterson2006-01-051-413/+0
|
* Move package loader to _import_tools.pyTravis Oliphant2006-01-051-0/+265
|
* Changed all references to scipy to numpyTravis Oliphant2006-01-041-1/+1
|
* Moved scipy directory to numpyTravis Oliphant2006-01-041-0/+148