summaryrefslogtreecommitdiff
path: root/numpy/__init__.py
Commit message (Collapse)AuthorAgeFilesLines
* MAINT: add a warning filter for possible "ndarray size changed" Cython noise.Ralf Gommers2015-04-051-0/+1
| | | | | See gh-432 for details. Motivation for adding this now is the discussion on gh-5343.
* ENH: _NoValue class at top-level to test kwargsMatthew Brett2015-03-151-0/+10
| | | | | | | | | | Add _NoValue class at top level to make it possible to detect when non-default values got passed to a keyword argument, as in: def func(a, b=np._NoValue): if b is not np._NoValue: warnings.warn("Argument b is deprecated", DeprecationWarning)
* Update __init__.pyCameron Bates2014-04-261-1/+1
| | | interpreter is misspelled
* DEP: Deprecate numpy.rankSebastian Berg2014-04-221-1/+14
| | | | | | | This function is commonly confused with numpy.linalg.matrix_rank and exists itself only for history reasons. Closes gh-4616
* MAINT: Make useless imports of oldnumeric and numarray safe.Charles Harris2013-09-281-0/+6
| | | | | | | The oldnumeric and numarray packages were removed in numpy 1.9, but some packages, e.g. scipy, import them even though they are not used. This defines both to the string 'removed' in numpy/__init__.py, which avoids an import error.
* STY: Giant whitespace cleanup.Charles Harris2013-08-181-1/+0
| | | | Now is as good a time as any with open PR's at a low.
* DEP: Deprecate the oldnumeric and numarray modules.Charles Harris2013-06-101-1/+14
| | | | | | | | | The numarray and oldnumeric modules are deprecated. This is a bit tricky as raising a DeprecationWarning on import causes an error when tests are run. To deal with that, a ModuleDeprecationWarning class is added to numpy and NoseTester is modified to ignore that warning during testing. Closes #2905
* 2to3: Apply unicode fixer.Charles Harris2013-04-211-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | The unicode fixer strips the u from u'hi' and converts the unicode type to str. The first won't work for Python 2 and instead we replace the u prefix with the sixu function borrowed from the six compatibility package. That function calls the unicode constructor with the 'unicode_escape' encoder so that the many tests using escaped unicode characters like u'\u0900' will be handled correctly. That makes the sixu function a bit different from the asunicode function currently in numpy.compat and also provides a target that can be converted back to the u prefix when support for Python 3.2 is dropped. Python 3.3 reintroduced the u prefix for compatibility. The unicode fixer also replaces 'unicode' with 'str' as 'unicode' is no longer a builtin in Python 3. For code compatibility, 'unicode' is defined either as 'str' or 'unicode' in numpy.compat so that checks like if isinstance(x, unicode): ... will work properly for all python versions. Closes #3089.
* 2to3: Apply the `numliterals` fixer and skip the `long` fixer.Charles Harris2013-04-131-2/+3
| | | | | | | | | | | | | | | | | | | The numliterals fixer replaces the old style octal number like '01' by '0o1' removes the 'L' suffix. Octal values were previously mistakenly specified in some dates, those uses have been corrected by removing the leading zeros. Simply Removing the 'L' suffix should not be a problem, but in some testing code it looks neccesary, so in those places the Python long constructor is used instead. The 'long' type is no longer defined in Python 3. Because we need to have it defined for Python 2 it is added to numpy/compat/np3k.py where it is defined as 'int' for Python 3 and 'long' for Python 2. The `long` fixer then needs to be skipped so that it doesn't undo the good work. Closes #3074, #3067.
* 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: Apply `imports` fixer.Charles Harris2013-04-021-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The `imports` fixer deals with the standard packages that have been renamed, removed, or methods that have moved. cPickle -- removed, use pickle commands -- removed, getoutput, getstatusoutput moved to subprocess urlparse -- removed, urlparse moved to urllib.parse cStringIO -- removed, use StringIO or io.StringIO copy_reg -- renamed copyreg _winreg -- renamed winreg ConfigParser -- renamed configparser __builtin__ -- renamed builtins In the case of `cPickle`, it is imported as `pickle` when python < 3 and performance may be a consideration, but otherwise plain old `pickle` is used. Dealing with `StringIO` is a bit tricky. There is an `io.StringIO` function in the `io` module, available since Python 2.6, but it expects unicode whereas `StringIO.StringIO` expects ascii. The Python 3 equivalent is then `io.BytesIO`. What I have done here is used BytesIO for anything that is emulating a file for testing purposes. That is more explicit than using a redefined StringIO as was done before we dropped support for Python 2.4 and 2.5. Closes #3180.
* 2to3: Use absolute imports.Charles Harris2013-03-281-20/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/+1
| | | | | | | | 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.
* MAINT: silence Cython warnings about changes dtype/ufunc size.Ralf Gommers2012-09-081-0/+6
| | | | | | | | | These warnings are visible whenever you import scipy (or another package) that was compiled against an older numpy than is installed. For example compiled against 1.5.1, like current scipy binaries are, and used with 1.7.0. These warnings aren't useful; if numpy would really break its ABI it would be noticed in no time without these warnings.
* ENH: Put line ending on message to stderr.Charles Harris2011-04-261-1/+1
|
* ENH: Add Git revision hash to numpy dev version stringScott Sinclair2010-11-101-0/+1
| | | | | | | - Appends the first 6 characters of the Git revision used to build Numpy - Adds an additional attribute to easily obtain the full Git revision
* fixed a whole bunch of doctestsPaul Ivanov2009-12-281-0/+4
|
* Make top numpy __init__ importable from python3.David Cournapeau2009-12-031-2/+2
|
* Add support for chebyshev series and polynomials.Charles Harris2009-11-141-0/+3
| | | | | | | | | | | | | | | | New modules chebyshev and polynomial are added. The new polynomial module is not compatible with the current polynomial support in numpy, but is much like the new chebyshev module. The most noticeable difference to most will be that coefficients are specified from low to high power, that the low level functions do *not* accept the Chebyshev and Polynomial classes as arguements, and that the Chebyshev and Polynomial classes include a domain. Mapping between domains is a linear substitution and the two classes can be converted one to the other, allowing, for instance, a Chebyshev series in one domain to be expanded as a polynomial in another domain. The new modules are not automatically imported into the numpy namespace, they must be explicitly brought in with a "import numpy.polynomial" statement.
* ENH: move inspect copy into newly created compat module.David Cournapeau2009-10-131-0/+1
|
* Final doc import cleanups. Thanks to all contributors for the preceding commits!Pauli Virtanen2009-10-021-1/+1
| | | | | There are still some docstrings in the queue -- those'll be committed in later.
* Rename matrx to matrixlib.David Cournapeau2009-09-181-2/+2
| | | | | I forgot to commit the name change suggested by Stefan. You need to clean build/install directory when updating to this version.
* Move matrix class into its own module.David Cournapeau2009-09-161-0/+3
|
* Import documentation from doc wiki (part 2, work-in-progress docstrings, but ↵Pauli Virtanen2008-10-281-7/+12
| | | | they are still an improvement)
* Move documentation outside of source tree. Remove `doc` import from __init__.Stefan van der Walt2008-08-231-19/+11
|
* ran reindentJarrod Millman2008-08-081-1/+0
|
* Merge from documentation editor.Stefan van der Walt2008-08-051-9/+48
|
* Add numpy.doc topical documentation framework.Stefan van der Walt2008-07-091-1/+2
|
* 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.
* Add `ma` to __all__.Stefan van der Walt2008-06-181-1/+1
|
* Switched to use nose to run tests. Added test and bench functions to all ↵Alan McIntyre2008-06-171-10/+6
| | | | modules.
* fixed whitespace w/ reindentJarrod Millman2008-05-221-1/+0
|
* Don't assemble numpy module docstring from several parts; removes duplicationPauli Virtanen2008-05-141-40/+0
|
* Merge docstrings from wiki.Stefan van der Walt2008-05-141-6/+57
|
* ran reindent in preparation for the 1.1 releaseJarrod Millman2008-04-201-1/+1
|
* Add docs and examples for financial functions.Travis Oliphant2008-04-081-1/+1
|
* Put a more meaningful message when importing numpy from its source tree.David Cournapeau2008-03-131-1/+7
|
* Alter NumPy docstring to remove ad and give a litte more info.Travis Oliphant2008-02-291-10/+5
|
* Import add_newdocs earlier, so maskedarray can extend the addedStefan van der Walt2008-01-231-9/+8
| | | | documentation.
* Merge maskedarray branch up to r4729.Stefan van der Walt2008-01-181-10/+15
|\
| * Modify the setup routine to indicate that it is being run via a systemFernando Perez2007-12-301-4/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | global. This allows the main __init__ to detect the setup and avoid attempting to load things that aren't built yet. This is hackish, but the previously used method would fail if there was an existing system-wide numpy already installed, for example (which users might have no control over). There were frequent reports of problems with the previous method: - http://projects.scipy.org/pipermail/scipy-user/2007-November/014511.html - Tickets #561 and #565
| * Improve docstringsTravis Oliphant2007-12-281-5/+6
| |
| * Don't add test to numpy.__all__: it's not something that needs to be exportedcookedm2007-12-241-1/+1
| |
* | Move ma to numpy root. Fix unit tests. Remove references to numpy.core.ma.Stefan van der Walt2007-12-151-0/+1
|/
* Make sure we import numpy's configuration. Closes ticket #565.Stefan van der Walt2007-08-071-1/+1
|
* Print install location, numpy version, and python verstion in numpy.test()cookedm2007-06-171-0/+4
|
* NumpyTest.test() takes an extra argument, all, which, if true, makescookedm2007-04-221-5/+2
| | | | | it act like NumpyTest.testall(). This comes from some refactoring to remove duplicate code in .test and .testall().
* Add new MACRO. Fix ticket #454 by changing pkgload to a function instead of ↵Travis Oliphant2007-03-311-1/+4
| | | | an object.
* Whitespace cleanup.Stefan van der Walt2007-01-081-6/+6
|
* Refer to NumpyTest instead of ScipyTest.Stefan van der Walt2007-01-081-2/+2
|