summaryrefslogtreecommitdiff
path: root/numpy/lib/recfunctions.py
Commit message (Collapse)AuthorAgeFilesLines
...
* BUG: Preserve field order in join_by, avoids FutureWarningAllan Haldane2017-05-091-5/+35
| | | | Fixes #8940
* MAINT: We can now rely on itertools.izip_longest existingEric Wieser2017-02-231-13/+9
|
* DOC: Reconcile docstrings and function signatures where they disagreeRobert McGibbon2015-03-021-2/+2
| | | | | Fixed typos in docstrings were updated for functions where the parameter names in the docstring didn't match the function signature.
* STY: Make files in numpy/lib PEP8 compliant.Charles Harris2014-07-311-59/+57
| | | | The rules enforced are the same as those used for scipy.
* MAINT: Fixes for problems in numpy/lib revealed by pyflakes.Charles Harris2014-07-311-11/+10
| | | | | | Some of those problems look like potential coding errors. In those cases a Fixme comment was made and the offending code, usually an unused variable, was commented out.
* 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: Use from future_builtins zip and map.Charles Harris2013-04-211-7/+5
| | | | | | For Python versions 2.6 and 2.7 the iterator forms of zip and map can be imported from future_builtins. That is done here so as to avoid using itertools.{izip, imap}.
* 2to3: Apply basestring fixer.Charles Harris2013-04-131-0/+1
| | | | | | | | | | | The basestring class is not defined in Python 3 and the fixer replaces it with str. In order to have a common code base we define basestring in numpy/compat/py3k.py to be str when the Python version is >= 3, otherwise basestring and import it where needed. That works for most cases, but there are a few files where the version dependent define needs to be in the file. Closes #3042.
* 2to3: Apply itertools fixer.Charles Harris2013-04-121-3/+8
| | | | | | | | | | | | | In Python 3 zip, map, and filter are all iterators, consequently the itertools variants izip, imap, and ifilter have been removed and the itertools fixer replaces them with the unprefixed names. Because the places where the iterator variants are used in current look like places where the iterator version might be useful, the approach taken here is to define the prefixed versions to the unprefixed versions for Python 3, but otherwise import them from itertools. Closes #3233.
* 2to3: Apply `map` fixer.Charles Harris2013-04-101-1/+1
| | | | | | | | | | | | | | | | | | | In Python 3 `map` is an iterator while in Python 2 it returns a list. The simple fix applied by the fixer is to inclose all instances of map with `list(...)`. This is not needed in all cases, and even where appropriate list comprehensions may be preferred for their clarity. Consequently, this patch attempts to use list comprehensions where it makes sense. When the mapped function has two arguments there is another problem that can arise. In Python 3 map stops execution when the shortest argument list is exhausted, while in Python 2 it stops when the longest argument list is exhausted. Consequently the two argument case might need special care. However, we have been running Python3 converted versions of numpy since 1.5 without problems, so it is probably not something that affects us. Closes #3068
* 2to3: apply `dict` fixer.Charles Harris2013-04-061-1/+1
| | | | | | | | | | | | | | | In Python3 `dict.items()`, `dict.keys()`, and `dict.values()` are iterators. This causes problems when a list is needed so the 2to3 fixer explicitly constructs a list when is finds on of those functions. However, that is usually not necessary, so a lot of the work here has been cleaning up those places where the fix is not needed. The big exception to that is the `numpy/f2py/crackfortran.py` file. The code there makes extensive use of loops that modify the contents of the dictionary being looped through, which raises an error. That together with the obscurity of the code in that file made it safest to let the `dict` fixer do its worst. Closes #3050.
* 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-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-1/+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.
* BUG: Fixed bugs in join_by and added testsSkipper Seabold2011-07-081-3/+10
|
* TYP: Fix typo.Charles Harris2011-02-181-1/+1
|
* BUG: data shouldn't be an optional argument.Charles Harris2010-11-241-8/+6
|
* BUG: Fix logic in handling of dtype in append_fields.weathergod2010-11-241-2/+4
|
* * Fixed merge_arrays for arrays of size 1 (bug #1407)pierregm2010-03-261-53/+84
| | | | * merge_arrays now accepts sequences of lists/tuples as inputs
* STY: Use explicit itertools namespace for all itertools functions.Charles Harris2010-02-211-6/+4
|
* STY: Remove unneeded import.Charles Harris2010-02-211-5/+0
|
* PY3: The izip function is no longer available in itertools. Be explicit aboutCharles Harris2010-02-211-16/+17
| | | | using itertools.izip to 2to3 can make the fix.
* 3K: lib: zip is izip on Py3Pauli Virtanen2010-02-211-0/+4
|
* fixed a whole bunch of doctestsPaul Ivanov2009-12-281-44/+68
|
* * Added a 'autoconvert' option to stack_arrays.pierregm2009-02-021-5/+16
| | | | * Fixed 'stack_arrays' to work with fields with titles.
* * added recfunctions, a collection of utilities to manipulate structured arrays.pierregm2009-01-221-0/+931