summaryrefslogtreecommitdiff
path: root/numpy/lib
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #18652 from timhoffm/doc-plotRalf Gommers2021-03-211-1/+2
|\ | | | | DOC: Update some plotting code to current Matplotlib idioms
| * DOC: Update some plotting code to current Matplotlib idiomsTim Hoffmann2021-03-211-1/+2
| | | | | | | | | | | | | | | | | | - 3D Axes are created via add_subplot(projection='3d') - There is now a `stairs()` function that's specifically designed for showing histogram curves - Labels should be passed as keyword arguments to the plot functions instead of to `legend()`, which reduces the risk of mixing them up. - ensure equal axis scaling in the meshgrid example
* | Merge pull request #18642 from seberg/splitup-faster-argparsing-optimize-asarrayMatti Picus2021-03-212-6/+5
|\ \ | | | | | | ENH: Use new argument parsing for array creation functions
| * | ENH: Use new argument parsing for array creation functionsSebastian Berg2021-03-182-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The array creation functions have the most to gain: 1. np.asarray is 4 times faster and commonly used. 2. Other functions are wrapped using __array_function__ in Python making it more difficult This commit (unfortunatly) has to do a few things: * Modify __array_function__ C-side dispatching to accomodate the fastcall argument convention. * Move asarray, etc. to C after removing all "fast paths" from np.array (simplifying the code) * Fixup imports, since asarray was imported directly in a few places * Replace some places where `np.array` was probably used for speed instead of np.asarray or similar. (or by accident in 1 or 2 places)
* | | MAINT: use super() as described by PEP 3135Mike Taves2021-03-192-3/+3
| |/ |/|
* | MAINT: Added Chain exceptions where appropriate (#18400)Abhay Raghuvanshi2021-03-181-2/+2
|/ | | | | | | | | | | | | | | | | | | | | | | | * Added chain exception in _pocketfft.py * Added chain exception in format.py * Added chain exception in make_lite.py * Added chain exception in mrecords.py * added from e for exceptions * Minor update for _read_array_header exception msg * Removed \n from excp msg and e from msg format. Co-authored-by: Eric Wieser <wieser.eric@gmail.com> * Update numpy/linalg/lapack_lite/make_lite.py Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Charles Harris <charlesr.harris@gmail.com>
* MAINT: Added Chain exceptions where appropriate (#18394)Abhay Raghuvanshi2021-03-181-4/+4
| | | | | | | | | | | | | | | | | | | | | * Added chain exception in _bits_of func * Added chain exception * Added chain exception in unixccompiler.py * Added chain exception in config.py * Added chain exception in fcompiler __init__.py * Added chain exception in compaq.py * Added chain exception in format.py * Updated raise chain exception * STY: Break long line. Co-authored-by: Charles Harris <charlesr.harris@gmail.com>
* MAINT: Re-export a number of sub-modulesBas van Beek2021-03-151-0/+7
| | | | | | | Ensures that type checkers will allow the likes of: >>> import numpy as np >>> out = np.lib.stride_tricks.sliding_window_view(...)
* Merge pull request #18596 from mainak-debnath/maintRalf Gommers2021-03-131-8/+18
|\ | | | | MAINT: Chain exceptions in index_tricks.py and mrecords.py
| * added exception chaining in index_tricks.py and mrecords.pyMainak Debnath2021-03-111-8/+18
| |
* | Merge pull request #18583 from timhoffm/doc-flipRalf Gommers2021-03-131-9/+13
|\ \ | | | | | | DOC: Clarify docs for fliplr() / flipud()
| * | DOC: Clarify docs for fliplr() / flipud()Tim Hoffmann2021-03-091-9/+13
| |/
* | ENH: Add annotations for `np.lib.arrayterator`Bas van Beek2021-03-122-1/+57
|/
* DOC: trunc, floor, ceil, rint, fix should all link to each other in see alsoTim Hoffmann2021-03-011-1/+1
|
* MAINT: Relax the type-constraints of `IndexExpression.__getitem__`Bas van Beek2021-02-251-5/+5
|
* ENH: Expose `index_tricks` content to `np` and `np.lib` namespaceBas van Beek2021-02-251-14/+20
|
* ENH: Add annotations for `np.lib.index_tricks`Bas van Beek2021-02-251-0/+179
|
* API: make piecewise subclass safe using use zeros_like.Marten van Kerkwijk2021-02-222-2/+10
| | | | | | Subclass input of piecewise was already respected, so it seems more logical to ensure the output is the same subclass (possibly just an oversight that it was not done before).
* BUG: Fixed an issue where `diagflat` could overflow on windows and 32-bit ↵Bas van Beek2021-02-211-4/+4
| | | | platforms
* BUG: Fix unique handling of nan entries. (#18070)Filip Trojan2021-02-122-1/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * benchmark bench_lib.Unique added * extended test_unique_1d * modify _unique1d * extend test with return_index, return_inverse and return_counts parameters * documentation updated * Update numpy/lib/arraysetops.py Co-authored-by: Bas van Beek <43369155+BvB93@users.noreply.github.com> * full coverage of nan types Co-authored-by: Bas van Beek <43369155+BvB93@users.noreply.github.com> * added tests for the datetime like dtypes * nan as vector of length 1 * use aux[-1] as nan, ..versionchanged, release note * for complex arrays all NaN values are considered equivalent Co-authored-by: filip_trojan <Tarantula2018> Co-authored-by: Bas van Beek <43369155+BvB93@users.noreply.github.com>
* Fixed chain exception for array_split func (#18317)Abhay Raghuvanshi2021-02-101-1/+1
|
* Adjusted formulas to estimator and removed repeatJamie2021-02-101-2/+1
|
* Merge remote-tracking branch 'upstream/master' into histogram-binwidth-docJamie2021-02-106-9/+100
|\
| * Merge pull request #18369 from AngelGris/bugfix-for-in1d-with-tuplesCharles Harris2021-02-102-0/+37
| |\ | | | | | | BUG: np.in1d bug on the object array (issue 17923)
| | * Implement different approach to fix bugAngelGris2021-02-081-20/+8
| | |
| | * BUG: np.in1d bug on the object array (issue 17923)AngelGris2021-02-081-4/+20
| | |
| | * numpy/lib/arraysetops.pyAngelGris2021-02-081-0/+33
| | |
| * | Merge pull request #18377 from BvB93/ufunclikeCharles Harris2021-02-093-5/+60
| |\ \ | | | | | | | | ENH: Add annotations for `np.lib.ufunclike`
| | * | MAINT: Fix the dtype mentioned in 2 `np.lib.ufunclike` exceptionsBas van Beek2021-02-091-2/+4
| | | |
| | * | ENH: Expose `ufunclike` annotations to the `np` and `np.lib` namespaceBas van Beek2021-02-091-3/+6
| | | |
| | * | ENH: Add annotations for `np.lib.ufunclike`Bas van Beek2021-02-091-0/+50
| | |/
| * | Merge pull request #18379 from anntzer/mndSebastian Berg2021-02-091-2/+2
| |\ \ | | | | | | | | DOC: Fix docstring of _median_nancheck.
| | * | DOC: Fix docstring of _median_nancheck.Antony Lee2021-02-091-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | _median_nancheck doesn't support axis being anything other than an integer (otherwise the call to moveaxis would fail). This is fine, because median goes through _ureduce for multi-axis support.
| * | | Merge pull request #18324 from anntzer/fmSebastian Berg2021-02-091-2/+1
| |\ \ \ | | |_|/ | |/| | MAINT: Avoid moveaxis overhead in median.
| | * | MAINT: Avoid moveaxis overhead in median.Antony Lee2021-02-061-2/+1
| | |/ | | | | | | | | | | | | | | | This change speeds up taking the median of 1001 floats by ~20%, as measured by `python -mtimeit -s 'import numpy as np; x = np.random.randn(1001)' -- 'np.median(x)'`
* | | Merge remote-tracking branch 'upstream/master' into histogram-binwidth-docJamie2021-02-071-4/+7
|\ \ \ | |/ /
| * | Merge pull request #18342 from zolboo1024/trapz_docMatti Picus2021-02-061-4/+7
| |\ \ | | |/ | |/| DOC: Specified all possible return types for trapz function #18140
| | * Specified the return type for trapz to include the possibility of ndarray ↵zolboo10242021-02-051-4/+7
| | | | | | | | | | | | being returned
* | | Added sentence to docstring of histogram_bin_edgesJamie2021-02-061-1/+3
|/ /
* | Merge pull request #18302 from BvB93/missing-attrCharles Harris2021-02-021-1/+4
|\ \ | | | | | | MAINT: Add missing placeholder annotations
| * | MAINT: Add previously-missing placeholder annotationsBas van Beek2021-02-011-0/+1
| | |
| * | MAINT: Add missing `__all__` annotationsBas van Beek2021-02-011-1/+3
| | |
* | | ENH: defer the import of shutilChristoph Gohlke2021-01-311-2/+4
|/ /
* | DOC: Nupydoc format space before `:` in ParametersMatthias Bussonnier2021-01-311-1/+1
|/ | | | Missing `s` in two spellings.
* Merge pull request #18232 from Carreau/shape_base_docMatti Picus2021-01-261-7/+7
|\ | | | | DOC: lib/shape_base numpydoc formatting.
| * DOC: lib/shape_base numpydoc formatting.Matthias Bussonnier2021-01-251-7/+7
| | | | | | | | | | | | Numpydoc parses parameter different depending on whether there is a space before the colon, for it to be properly interpreted as names and types; spaces need to be put on each side.
* | Merge pull request #18116 from seberg/futurewarn-string-promotionMatti Picus2021-01-261-1/+4
|\ \ | |/ |/| DEP: Deprecate promotion of numbers and bool to string
| * DEP: Deprecate promotion of numbers and bool to stringSebastian Berg2021-01-251-1/+4
| |
* | Merge pull request #18176 from Illviljan/Illviljan-faster_tril_indicesMatti Picus2021-01-251-3/+10
|\ \ | | | | | | ENH: Improve performance of tril_indices and triu_indices
| * | import indices, broadcast_toIllviljan2021-01-151-7/+8
| | |