summaryrefslogtreecommitdiff
path: root/numpy/lib/__init__.py
Commit message (Collapse)AuthorAgeFilesLines
* MAINT: Move histogram and histogramdd into their own moduleEric Wieser2017-12-101-0/+2
| | | | | | | 800 self-contained lines are easily enough to go in their own file, as are the 500 lines of tests. For compatibility, the names are still available through `np.lib.function_base.histogram` and `from np.lib.function_base import *` For simplicity of imports, all of the unqualified `np.` names are now qualified
* MAINT: Rearrange files in numpy/testing module.Charles Harris2017-07-041-1/+1
| | | | | | | | | | | | | | | | | The aim here is to separate out the nose dependent files prior to adding pytest support. This could be done by adding new files to the general numpy/testing directory, but I felt that it was to have the relevant files separated out as it makes it easier to completely remove nose dependencies when needed. Many places were accessing submodules in numpy/testing directly, and in some cases incorrectly. That presented a backwards compatibility problem. The solution adapted here is to have "dummy" files whose contents will depend on whether of not pytest is active. That way the module looks the same as before from the outside. In the case of numpy itself, direct accesses have been fixed. Having proper `__all__` lists in the submodules helped in that.
* ENH: add support for python3.6 memory tracingJulian Taylor2017-04-281-1/+2
| | | | | | | | | Python 3.6 added a private API for tracing arbitrary memory allocations so the tracemalloc module [0] can be used with numpy. closes gh-4663 [0] https://docs.python.org/3/library/tracemalloc.html
* ENH: Add NDArrayOperatorsMixin mixin class.Stephan Hoyer2017-04-271-0/+2
| | | | | | This mixin class provides an easy way to implement arithmetic operators that defer to __array_ufunc__ like numpy.ndarray in non-ndarray subclasses.
* [TST] Refactor new raise_warnings logic for subpackage test suitesNathaniel J. Smith2015-12-301-3/+3
|
* DOC: add lib.Arrayterator to reference guide. Closes gh-6404.Ralf Gommers2015-10-111-1/+1
|
* ENH: Add the scipy NumpyVersion class.Charles Harris2014-05-151-0/+1
| | | | | The class is in numpy/lib/_version.py and can be used to compare numpy versions when the version goes to double digits.
* STY: Giant comma spacing fixup.Charles Harris2013-08-181-1/+1
| | | | | | | Run the 2to3 ws_comma fixer on *.py files. Some lines are now too long and will need to be broken at some point. OTOH, some lines were already too long and need to be broken at some point. Now seems as good a time as any to do this with open PRs at a minimum.
* MAINT: Separate nan functions into their own module.Charles Harris2013-08-121-1/+4
| | | | | | | | | | | | | | New files lib/nanfunctions.py and lib/tests/test_nanfunctions.py are added and both the previous and new nan functions and tests are moved into them. The existing nan functions moved from lib/function_base are: nansum, nanmin, nanmax, nanargmin, nanargmax The added nan functions moved from core/numeric are: nanmean, nanvar, nanstd
* 2to3: Apply `print` fixer.Charles Harris2013-04-061-1/+1
| | | | | | | 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-17/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* ENH: Add module containing functions for padding n-dimensional arrays.tim cera2012-04-041-0/+2
| | | | | | | | | | | | | The various padding functions are exposed as options to a public 'pad' function. Example: pad(a, 5, mode='mean') Current modes are 'constant', 'edge', 'linear_ramp', 'maximum', 'mean', 'median', 'minimum', 'reflect', 'symmetric', 'wrap', and <function> This commit includes unit tests and doctests and is based on feature request ticket #655.
* Rename numpy/lib/io.py to numpy/lib/npyio.py. The py3tool can probably beCharles Harris2010-03-241-2/+2
| | | | cleaned up a bit more with this change, but that is for later.
* Move finfo into core.David Cournapeau2009-09-161-4/+0
|
* Move numpy.lib __doc__ back to info.py; was moved to __init__.py by mistake.Pauli Virtanen2009-02-141-148/+0
|
* Import documentation from doc wiki (part 2, work-in-progress docstrings, but ↵Pauli Virtanen2008-10-281-0/+148
| | | | they are still an improvement)
* Add Roberto de Almeida's Arrayterator.Stefan van der Walt2008-08-131-0/+1
|
* ran reindentJarrod Millman2008-08-081-1/+0
|
* ENH: Add broadcast_arrays() function to expose broadcasting to pure Python ↵Robert Kern2008-07-031-0/+2
| | | | functions that cannot be made to be ufuncs.
* Restore old test framework classes.Alan McIntyre2008-06-211-1/+1
| | | | | | | | | | | Added numpy.testing.run_module_suite to simplify "if __name__ == '__main__'" boilerplate code in test modules. Removed numpy/testing/pkgtester.py since it just consisted of an import statement after porting SciPy r4424. Allow numpy.*.test() to accept the old keyword arguments (but issue a deprecation warning when old arguments are seen). numpy.*.test() returns a test result object as before. Fixed typo in distutils doc.
* Switched to use nose to run tests. Added test and bench functions to all ↵Alan McIntyre2008-06-171-3/+4
| | | | modules.
* Add docs and examples for financial functions.Travis Oliphant2008-04-081-0/+2
|
* Merge the lib_for_io branch back into the trunk.Travis Oliphant2007-12-301-0/+2
|\
| * Create a branch for io work in NumPyTravis Oliphant2007-12-151-35/+0
|/
* Whitespace cleanup.Stefan van der Walt2007-01-081-1/+0
|
* fix: `emath` instead of `nmath`abaecker2006-05-031-1/+1
|
* numpy.lib.scimath --> numpy.emathTravis Oliphant2006-05-021-1/+1
|
* Add math module to numpy namespace so numpy.math works same as Numeric.math. ↵Travis Oliphant2006-05-021-2/+3
| | | | Change numpy.math to numpy.nmath
* Run reindent.py (script distributed with Python) over the source to remove ↵cookedm2006-03-101-1/+1
| | | | extraneous whitespace
* Added more debugging hooks to PackageLoader: NUMPY_IMPORT_DEBUG. Avoid ↵Pearu Peterson2006-02-241-2/+3
| | | | initiating Scipy/NumpyTest during imports.
* Upgrade version number of trunk and add 'math'Travis Oliphant2006-02-171-1/+1
|
* Arraysetops added to numpy.libRobert Cimrman2006-01-091-0/+2
|
* Cleaning up __all__ list and numpy namespace.Pearu Peterson2006-01-051-2/+12
|
* More fixes...Travis Oliphant2006-01-041-2/+0
|
* More changesTravis Oliphant2006-01-041-0/+24