summaryrefslogtreecommitdiff
path: root/numpy/lib/recfunctions.py
Commit message (Collapse)AuthorAgeFilesLines
* DOC: Fix syntax errors in docstrings for versionchanged, versionadded (#17338)Bradley Dice2020-09-171-1/+1
| | | * DOC: Fix typos in versionchanged.
* DOC: Fixed typo in lib/recfunctions.py (#16973)Jesse Li2020-07-291-2/+2
|
* STY: use 'yield from <expr>' for simple cases (#15444)Mike Taves2020-01-271-10/+6
| | | | | | | | | This PR uses simple cases of PEP 380 to rewrite: for v in g: yield v into: yield from <expr>
* MAINT: Replace basestring with str.Charles Harris2020-01-231-4/+3
| | | | | | | This replaces basestring with str except in - tools/npy_tempita/ - numpy/compat/py3k.py
* [MAINT] Cleanup python2 sys.version checksSeth Troisi2020-01-201-10/+1
|
* DOC: fix typosBrian Wignall2020-01-141-1/+1
|
* MAINT: Remove unnecessary 'from __future__ import ...' statementsJon Dufresne2020-01-031-2/+0
| | | | | As numpy is Python 3 only, these import statements are now unnecessary and don't alter runtime behavior.
* Merge pull request #14511 from eric-wieser/fix-flatten_dtypeMatti Picus2019-09-161-1/+1
|\ | | | | BUG: Fix flatten_dtype so that nested 0-field structs are flattened correctly
| * BUG: Fix flatten_dtype so that nested 0-field structs are flattened correctlyEric Wieser2019-09-141-1/+1
| | | | | | | | This affects the behavior of merge_arrays.
* | API: Do not return None from recfunctions.drop_fieldsEric Wieser2019-09-141-3/+5
|/ | | | This return value was not documented and did not make any sense. There's no reason to have a special case here.
* Merge pull request #14310 from ahaldane/fix_struct_to_unstruct_nestingCharles Harris2019-08-231-7/+39
|\ | | | | MAINT: Fix behavior of structured_to_unstructured on non-trivial dtypes
| * MAINT: fix behavior of structured_to_unstructured on non-trivial dtypesAllan Haldane2019-08-231-7/+39
| | | | | | | | Fixes #13333
* | Merge remote-tracking branch 'upstream/master' into fix-if-fieldsEric Wieser2019-08-191-93/+99
|\ \ | |/
| * fixed unstructured_to_structured in recfunctionsColin Snyder2019-07-201-3/+9
| |
| * Removed unnecessary decorators and dispatcher functionsColin Snyder2019-07-151-15/+0
| |
| * exported correct functions and made private the restColin Snyder2019-07-141-25/+27
| |
| * add new recfunctions to __all__Colin Snyder2019-07-101-11/+16
| |
| * MAINT: Misc. typo fixes (#13664)luzpaz2019-05-311-1/+1
| | | | | | | | | | | | * DOC, MAINT: Misc. typo fixes Found via `codespell`
| * Merge pull request #13332 from eric-wieser/fix-subarray-unstructuredCharles Harris2019-05-111-2/+2
| |\ | | | | | | BUG: Always return views from structured_to_unstructured when possible
| | * BUG: Always return views from structured_to_unstructured when possibleEric Wieser2019-05-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Also applies to unstructured_to_structured While producing correct resutls, the test added in this commit would previously make an unecessary copy, causing the assertion to fail. The cause was `astype` was being asked to convert from a subarray of shape `(x, y)` to one of `(x*y,)`, which it cannot do without making a copy. This changes the approach used to skip the step of flattening subarrays to 1d
| * | Merge remote-tracking branch 'upstream/master' into fix-1-field-unstructuredEric Wieser2019-04-231-47/+55
| |\ \ | | |/ | |/|
| | * MAINT: include recfunctions moduleTyler Reddy2018-12-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | * added lib.recfunctions to refguide PUBLIC_SUBMODULES, as the doctests were otherwise not getting executed * fixed a failing doctest in recfunctions after above activation
| | * MAINT: address several reviewer commentsTyler Reddy2018-12-141-1/+1
| | |
| | * TST, DOC: enable refguide_checkTyler Reddy2018-12-141-46/+54
| | | | | | | | | | | | | | | | | | | | | | | | * ported the refguide_check module from SciPy for usage in NumPy docstring execution/ verification; added the refguide_check run to Azure Mac OS CI * adjusted NumPy docstrings such that refguide_check passes
| * | BUG: Fix structured_to_unstructured on single-field typesEric Wieser2019-04-151-1/+1
| |/ | | | | | | | | | | Previously a single-field type would decay, which is undesirable. The included test previously did not pass
* | MAINT: Fix remaining misuses of bool(dt.names)Eric Wieser2019-08-191-3/+3
| | | | | | | | It's not clear that these have any visible effect, but we should be consistent with how we detect structured types.
* | MAINT: Remove incorrect comment about flatteningEric Wieser2019-08-191-2/+2
| | | | | | | | | | Also adjust the code to more clearly indicate what actually happens. The behavior is identical before and after this patch.
* | BUG: recfunctions: Don't return None in place of empty sequencesEric Wieser2019-08-191-6/+6
|/ | | | | | Replacing empty tuples with `None` is a bad idea, and just results in an API that is hard to consume - especially since the behavior was never documented. This affects `get_names`, `get_names_flat`, and `get_fieldstructure`.
* MAINT: Fixups to new functions in np.lib.recfunctionsAllan Haldane2018-11-261-13/+28
|
* MAINT: Add new recfunctions to numpy function APIAllan Haldane2018-11-231-0/+23
|
* ENH: Fixups to multi-field assignment helpersAllan Haldane2018-11-221-42/+64
|
* ENH: add multi-field assignment helpers in np.lib.recfunctionsAllan Haldane2018-10-311-1/+280
| | | | | | Adds helper functions for the copy->view transition for multi-field indexes. Adds `structured_to_unstructured`, `apply_along_fields`, `assign_fields_by_name`, `require_fields`.
* ENH: __array_function__ support for np.lib, part 2/2 (#12119)Stephan Hoyer2018-10-221-1/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ENH: __array_function__ support for np.lib, part 2 xref GH12028 np.lib.npyio through np.lib.ufunclike * Fix failures in numpy/core/tests/test_overrides.py * CLN: handle depreaction in dispatchers for np.lib.ufunclike * CLN: fewer dispatchers in lib.twodim_base * CLN: fewer dispatchers in lib.shape_base * CLN: more dispatcher consolidation * BUG: fix test failure * Use all method instead of function in assert_equal * DOC: indicate n is array_like in scimath.logn * MAINT: updates per review * MAINT: more conservative changes in assert_array_equal * MAINT: add back in comment * MAINT: casting tweaks in assert_array_equal * MAINT: fixes and tests for assert_array_equal on subclasses
* MAINT: push back multifield copy->view changes to 1.16Allan Haldane2018-06-111-0/+78
|
* DOC: add existing recfunctions documentation to outputmattip2018-06-011-6/+7
|
* MAINT: Avoid one more use of descrEric Wieser2017-07-011-11/+6
|
* MAINT: remove tuple<->list conversion danceEric Wieser2017-07-011-30/+31
|
* MAINT: Shortcut for flat dtypes wasn't used for scalar dtypesEric Wieser2017-07-011-3/+3
|
* BUG: flatten_descr returns string not dtype for scalar dtypeEric Wieser2017-07-011-1/+1
|
* MAINT: Stop using .descr in recfunctionsEric Wieser2017-07-011-18/+22
| | | | This change shouldn't affect behaviour - all old uses were still correct.
* BUG: stack_arrays fails for subdtypesEric Wieser2017-07-011-5/+5
| | | | Again, fixed by not using descr
* BUG: recfunctions.join_by fails when key is a subdtypeEric Wieser2017-07-011-11/+47
| | | | | | | | | It seems that working with .descr is a generally terrible idea. Instead we introduce `get_fieldspec`, which returns a list of 2-tuples, encapsulating subdtypes. This also means that np.core.test_rational.rational survives a roundtrip - its .descr is 'V8', which ddoesn't survive
* BUG: recfunctions.join_by fails for colliding values with different dtypesEric Wieser2017-07-011-11/+12
| | | | Fixes #9338
* MAINT: use set operators for brevityEric Wieser2017-07-011-3/+3
|
* 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.