Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | | Add examples for intersect1d and union1d of more than two arrays. | Christian Brueffer | 2014-10-15 | 1 | -0/+10 | |
| | | | | | | | | The approach was suggested by Jaime Frio in issue #5179. | |||||
* | | BUG: np.unique with chararray + inverse_index | CJ Carey | 2014-09-23 | 1 | -1/+1 | |
| | | | | | | | | | | The call to `empty_like` was trying to use the `chararray` subclass, which doesn't support the `np.intp` dtype. | |||||
* | | DOC: warn about using a set with 'in1d'. | Patrick Peglar | 2014-08-31 | 1 | -0/+4 | |
| | | ||||||
* | | ENH: Speed up `unique` with `return_inverse` | jaimefrio | 2014-08-27 | 1 | -2/+3 | |
|/ | | | | This replaces a sort with fancy indexing. | |||||
* | STY: Make files in numpy/lib PEP8 compliant. | Charles Harris | 2014-07-31 | 1 | -7/+7 | |
| | | | | The rules enforced are the same as those used for scipy. | |||||
* | MAINT: Fixes for problems in numpy/lib revealed by pyflakes. | Charles Harris | 2014-07-31 | 1 | -4/+7 | |
| | | | | | | 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. | |||||
* | BUG: Correct behavior for lists of tuples in unique, closes #4785 | jaimefrio | 2014-06-06 | 1 | -7/+1 | |
| | | | | | | | | np.unique produces wrong results when passed a list of tuples and no keyword arguments, as it fails to recognize it as a multidim array, but handles it as a 1D array of objects. The only way around this seems to be to completely eliminate the fast path for non-array inputs using `set`. | |||||
* | ENH: add a 'return_counts=' keyword argument to `np.unique` | jaimefrio | 2014-04-05 | 1 | -26/+42 | |
| | | | | | | | | | | | | | | | | This PR adds a new keyword argument to `np.unique` that returns the number of times each unique item comes up in the array. This allows replacing a typical numpy construct: unq, _ = np.unique(a, return_inverse=True) unq_counts = np.bincount(_) with a single line of code: unq, unq_counts = np.unique(a, return_counts=True) As a plus, it runs faster, because it does not need the extra operations required to produce `unique_inverse`. | |||||
* | BUG: Fixes #2799 | jaimefrio | 2014-02-21 | 1 | -2/+1 | |
| | | | | | Use `np.sort` instead of `sorted` when the input is a list and no indices are requested. Fixes #2799. | |||||
* | ENH: add `invert` parameter to numpy.in1d(). | Julien Phalip | 2013-04-08 | 1 | -7/+26 | |
| | ||||||
* | 2to3: Apply `print` fixer. | Charles Harris | 2013-04-06 | 1 | -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 Harris | 2013-03-28 | 1 | -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 Harris | 2013-03-01 | 1 | -0/+3 | |
| | | | | | | | | 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: Fix regression for in1d with non-array input | Sebastian Berg | 2012-12-08 | 1 | -0/+4 | |
| | | | | | | | | | There was a regression introduced by the speed improvement in commit 6441c2a. This fixes it, and generally ravels the arrays for np.in1d. However it can be argued that at least the first array should not be ravelled in the future. Fixes "Issue gh-2755" | |||||
* | DOC: merge doc wiki edits. A number of small edits in linalg and lib. | Ralf Gommers | 2012-07-07 | 1 | -8/+8 | |
| | ||||||
* | BUG: ticket #2063, make unique return consistent index. | Bryan Van de Ven | 2012-03-30 | 1 | -3/+6 | |
| | | | | | | Make unique use mergesort when return_index is true. This quarantees that the returned indices are of the first occurrence of the unique elements and makes the behavior better defined and consistent. | |||||
* | ENH: missingdata: Implemented boolean assignment, working with NA masks | Mark Wiebe | 2011-08-27 | 1 | -1/+1 | |
| | ||||||
* | ENH: speed up in1d() in the case of ar1 >> ar2. Closes #1603. | rgommers | 2011-05-29 | 1 | -2/+10 | |
| | | | | | | A timing script justifying the switching criterion is attached to ticket 1603. Thanks to Neil Crighton. | |||||
* | DEP: remove unique1d, setmember1d and intersect1d_nu. | rgommers | 2011-03-11 | 1 | -76/+2 | |
| | ||||||
* | Merge deprecate_with_doc into deprecate(message="..."). | Stefan van der Walt | 2009-10-25 | 1 | -4/+4 | |
| | ||||||
* | Docstring update: lib | Pauli Virtanen | 2009-10-02 | 1 | -45/+91 | |
| | ||||||
* | Docstring updates, part 1 | Pauli Virtanen | 2009-10-02 | 1 | -11/+28 | |
| | ||||||
* | Fix to setdiff1d (and masked version) + tests (#1133, by N.C.) | Robert Cimrman | 2009-07-20 | 1 | -1/+4 | |
| | ||||||
* | Enhancements to arraysetops (ticket #1133, by Neil Crighton) | Robert Cimrman | 2009-07-08 | 1 | -196/+164 | |
| | ||||||
* | Merge from doc wiki | Pauli Virtanen | 2009-06-19 | 1 | -26/+72 | |
| | ||||||
* | Added setmember1d_nu to arraysetops. | Robert Cimrman | 2009-06-08 | 1 | -19/+43 | |
| | ||||||
* | Merge from the doc wiki | Pauli Virtanen | 2009-03-24 | 1 | -6/+16 | |
| | ||||||
* | * replace np.asarray by np.asanyarray in unique1d | pierregm | 2009-01-19 | 1 | -2/+8 | |
| | ||||||
* | Import documentation from doc wiki (part 2, work-in-progress docstrings, but ↵ | Pauli Virtanen | 2008-10-28 | 1 | -14/+14 | |
| | | | | they are still an improvement) | |||||
* | Removed unused imports. | Alan McIntyre | 2008-09-09 | 1 | -1/+0 | |
| | ||||||
* | Unique1d will now return unique as well as reverse indices. Fix order of | Stefan van der Walt | 2008-08-13 | 1 | -8/+45 | |
| | | | | returns [patch by Robert Cimrman]. | |||||
* | ran reindent | Jarrod Millman | 2008-08-08 | 1 | -1/+0 | |
| | ||||||
* | Merge from documentation editor. | Stefan van der Walt | 2008-08-05 | 1 | -42/+73 | |
| | ||||||
* | Standardized NumPy import as "import numpy as np". | Alan McIntyre | 2008-07-23 | 1 | -84/+22 | |
| | | | | Moved unique1d benchmarking code to new benchmarks directory. | |||||
* | Merge documentation changes from wiki. | Stefan van der Walt | 2008-05-19 | 1 | -71/+103 | |
| | ||||||
* | ran reindent | Jarrod Millman | 2008-02-08 | 1 | -1/+1 | |
| | ||||||
* | fixed setmember1d for string arrays | Robert Cimrman | 2007-12-20 | 1 | -3/+6 | |
| | ||||||
* | Edited module docstring. | Robert Cimrman | 2007-11-20 | 1 | -3/+5 | |
| | ||||||
* | Whitespace cleanup. | Stefan van der Walt | 2007-01-08 | 1 | -6/+6 | |
| | ||||||
* | * Fix #410 by using the stable mergesort instead of the unstable default ↵ | Robert Kern | 2007-01-08 | 1 | -45/+147 | |
| | | | | | | | sort in setmember1d(). * Add some more information to the function docstrings. * Reduced the "See also" sections of the docstrings to point to the module instead of the full list of functions (some of which were not entirely relevant). | |||||
* | (no commit message) | Robert Cimrman | 2006-10-12 | 1 | -7/+5 | |
| | ||||||
* | modernized to use new numpy features, speed-up of unique1d, doc update | Robert Cimrman | 2006-10-12 | 1 | -75/+95 | |
| | ||||||
* | Change unique1d's argument name from retindx to return_index. | Stefan van der Walt | 2006-09-28 | 1 | -6/+8 | |
| | ||||||
* | Remove sorted from unique1d. Add testall to test if level > 10. Remove ↵ | Travis Oliphant | 2006-09-20 | 1 | -1/+1 | |
| | | | | compiler warning. | |||||
* | Support empty arrays in setxor1d and setdiff1d. | Stefan van der Walt | 2006-09-19 | 1 | -2/+8 | |
| | ||||||
* | Fix unique1d for empty sets. Closes r208. | Stefan van der Walt | 2006-09-19 | 1 | -6/+10 | |
| | ||||||
* | Add ediff1d support for empty arrays. | Stefan van der Walt | 2006-09-18 | 1 | -23/+12 | |
| | | | | | Fix ediff1d for to_begin or to_end = 0. Allow insert to operate on empty arrays. | |||||
* | Clean-up some un-needed default axes. Fix default axes of ma.sum and ma.product | Travis Oliphant | 2006-08-29 | 1 | -1/+1 | |
| | ||||||
* | Add axis arguments to various functions so as not to rely on the defaults. | Travis Oliphant | 2006-08-29 | 1 | -1/+1 | |
| | ||||||
* | Restore un-needed axis arguments | Travis Oliphant | 2006-08-29 | 1 | -4/+4 | |
| |