summaryrefslogtreecommitdiff
path: root/doc/release
Commit message (Collapse)AuthorAgeFilesLines
* DEP: Finalize unravel_index `dims` alias for `shape` keywordSebastian Berg2020-12-021-0/+2
| | | | | The argument was renamed to `shape` and deprecated since NumPy 1.16, so the deprecation can now be finalized.
* Merge pull request #17727 from ganesh-k13/enh_14959-libdivideMatti Picus2020-12-021-0/+7
|\ | | | | ENH: Added libdivide for floor divide
| * DOC: Improved floor division (#17727)Ganesh Kathiresan2020-11-231-2/+2
| |
| * ENH: Improved floor division (#17727)Ganesh Kathiresan2020-11-211-4/+3
| |
| * ENH: Improved floor division (#17727)Ganesh Kathiresan2020-11-121-0/+0
| |
| * ENH: Improved floor division (#17727)Ganesh Kathiresan2020-11-111-0/+8
| |
* | MAINT: Update master after 1.20.x branch.v1.21.0.dev0Charles Harris2020-11-2755-663/+0
| | | | | | | | | | | | | | | | - Update setup.py - Update pavement.py - Add 1.21.0-note.rst - Update npyconfig.h - Clear release/upcoming_changes
* | ENH,API: Store exported buffer info on the array (#16938)Sebastian Berg2020-11-261-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ENH,API: Store exported buffer info on the array This speeds up array deallocation and buffer exports, since it removes the need to global dictionary lookups. It also somewhat simplifies the logic. The main advantage is prossibly less the speedup itself (which is not large compared to most things that happen in the livetime of an array), but rather that no unnecessary work is done for shortlived arrays, which never export a buffer. The downside of this approach is that the ABI changes for anyone who would be subclassing ndarray in C. * MAINT: Do not tag the NULL (no buffers exported) The allocation is not the right place to initialize to anything but NULL, so take the easy path and do not tag the NULL default. * TST: Add test for best try RuntimeError on corrupt buffer-info * Remove NPY_SIZEOF_PYARRAYOBJECT and add some documentation * Use 3 to tag the pointer and object for a "bad" one in the test * DEP: deprecate the NPY_SIZEOF_PYARRAYOBJECT macro * Tune down matti's deprecation to write the error instead. * Tweak macro, so that clang hopefully doesn't complain. * Use None instead of NULL in PyErr_WriteUnraisable, pypy seems to have a bug with it * Just comment it out... * Apply suggestions from code review Co-authored-by: Matti Picus <matti.picus@gmail.com> Co-authored-by: mattip <matti.picus@gmail.com>
* | DOC: Add release note for gh-16161.Charles Harris2020-11-251-0/+44
| |
* | Merge pull request #17823 from charris/update-release-fragmentsCharles Harris2020-11-238-0/+43
|\ \ | | | | | | DOC: Add missing release fragments to ``upcoming_changes``.
| * | DOC: Add gh-17344 to the NumPy 1.20.0 release notes.Charles Harris2020-11-221-0/+3
| | |
| * | DOC: Add gh-17284 to NumPy 1.20.0 release notes.Charles Harris2020-11-221-0/+6
| | |
| * | DOC: Add gh-17195 to NumPy 1.20.0 release notes.Charles Harris2020-11-221-0/+5
| | |
| * | DOC: Add gh-17123 to NumPy 1.20.0 release notes.Charles Harris2020-11-221-0/+12
| | |
| * | DOC: Add gh-16710 to NumPy 1.20.0 release notes.Charles Harris2020-11-191-0/+3
| | |
| * | DOC: Add gh-16594 to NumPy 1.20.0 release notes.Charles Harris2020-11-191-0/+4
| | |
| * | DOC: Add gh-16570 to NumPy 1.20.0 release notes.Charles Harris2020-11-191-0/+4
| | |
| * | DOC: Add gh-15121 to NumPy 1.20.0 release notes.Charles Harris2020-11-191-0/+6
| | |
* | | Merge pull request #15852 from sgasse/add_where_to_meanCharles Harris2020-11-221-0/+24
|\ \ \ | |/ / |/| | ENH: Add where argument to np.mean
| * | ENH: Add where argument to several functionsSimon Gasse2020-07-181-0/+24
| | | | | | | | | | | | | | | | | | Harmonize the signature of np.mean, np.var np.std, np.any, np.all, and their respective nd.array methods with np.sum by adding a where argument, see gh-15818.
* | | DOC: Fix up links, code blocks of release note fragmentsSebastian Berg2020-11-168-14/+14
| | | | | | | | | | | | | | | This should fix hopefully all broken links and missing code blocks. I also slight shortened one of the very long titles.
* | | DOC: Add "performance" category to the release notesSebastian Berg2020-11-102-1/+7
| | |
* | | BUG: Raise promotion error if a DType was provided in array coercion (gh-17706)Sebastian Berg2020-11-091-0/+10
| |/ |/| | | | | | | | | | | | | | | | | | | The new array coercion code incorrectly promoted to "object" when a promotion was impossible and a dtype passed in. This likely only was relevant for `dtype="V"` where different void dtypes (structured or different length) often cannot be promoted to each other. Previously, this worked in some cases e.g. when the array contained byte strings the correct string was found and then cast to void. Now the void dtypes are promoted, and this fails (unless the string lengths match). The error for promotion is now refined in this case.
* | API: Do not import sliding_window_view to main namespaceSebastian Berg2020-11-051-3/+4
| | | | | | | | | | At least for now, lets not import it to the main namespace, since there is no agreement that this is a good idea.
* | ENH: Implement sliding window (gh-17394)Klaus Zimmermann2020-11-051-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * implement sliding_window_view #7753 Test cases are shown in the issue page. * Add Example Cases * Add step_size and N-dim support * Add shape and step_size check. Remove warning. * Remove shape default Add step_size default's description. * Give proper parameter name 'step' * fix a parameter description mistake * implement test function for sliding_window_view() * implement test function for sliding_window_view() * Fix according to @eric-wieser comments * Change arange to ogrid in Examples * remove np.squeeze on return line * Clarify document to avoid parameter confusion. * add `writable` and more explanation in docs * resolve a write conflit * fixes according to @seberg review * resolve write hazard * remove outdated docs. * change referring according to @mattip. change 'writeable' to 'readonly' as @seberg suggest. remove 'step' as @eric-wieser request * fix test minor error * DOC: Grammar fixes * STY: Add missing line break required by PEP8 * + Change readonly parameter to writeable. + Update writeable description. + Fix a few parameter checks. + Other minor improvements. * Move to new api as proposed by @eric-wieser - Change api to follow suggestion by Eric Wieser in https://github.com/numpy/numpy/pull/10771#issuecomment-524715356 - Update docstring - Add more tests * Improve documentation * Add sliding_window_view to documentation index * Apply suggestions from code review Co-authored-by: Eric Wieser <wieser.eric@gmail.com> * Fix window shape check * Add `sliding_window_view` to __all__ * Add tests for error cases * Add array_function dispatching * Change dispatcher argument defaults to None * Simplify array function dispatching * Added "np." prefix to doctests * Split tests * Improved docstring * Add release note * Fix docstring formatting * Fix doctest * Remove namespacing in documentation indexing * Improve docstring * Improved docstring * Simplified docstring * Improve docstring to make pseudo code stand out * Improve docstring * Add simple application example * Correct release note * Improve link with as_strides * Add note about performance * Tidy up main doc string * Make language on performance warning stronger * Bugfix: pass subok and writeable to as_strided * Add writeable test * Add subok test * Change subok test to use custom array subclass instead of unsupported MaskedArray * Add version added information Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Fanjin <fjzeng@ucsd.edu> Co-authored-by: Fanjin Zeng <Fnjn@users.noreply.github.com> Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: fanjin <fjzeng@outlook.com> Closes gh-7753
* | Merge pull request #17596 from seberg/subarray-dtype-futurewarningMatti Picus2020-10-292-24/+30
|\ \ | | | | | | DEP,BUG: Coercion/cast of array to a subarray dtype will be fixed
| * | DEP,BUG: Coercion/cast of array to a subarray dtype will be fixedSebastian Berg2020-10-212-24/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This currently appends the subarray dtype dimensions first and then tries to assign to the result array which uses incorrect broadcasting (broadcasting against the subarray dimensions instead of repeating each element according to the subarray dimensions). This also fixes the python scalar pathway `np.array(2, dtype="(2)f4,")` which previously only filled the first value. I consider that a clear bug fix. Closes gh-17511
* | | Merge pull request #17577 from cjblocker/polymul-dtypeMatti Picus2020-10-281-0/+6
|\ \ \ | | | | | | | | BUG: Respect dtype of all-zero argument to poly1d
| * | | DOC: Added compatibility release note for dtype of all-zero poly1dCameron Blocker2020-10-251-0/+6
| |/ /
* | | Merge pull request #17580 from charris/cleanup-swig-for-python3Matti Picus2020-10-241-0/+4
|\ \ \ | |/ / |/| | MAINT: Cleanup swig for Python 3.
| * | MAINT: Cleanup swig for Python 3.Charles Harris2020-10-181-0/+4
| | | | | | | | | | | | Replaces ``PyInt_Check`` and ``PyInt_AsLong`` in a few places.
* | | ENH: add function to get broadcast shape from a given set of shapes. (#17535)madhulikajc2020-10-171-0/+15
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ENH: add function to get broadcast shape from a given set of shapes. Add new function numpy.broadcast_shape which takes tuples for the shapes to be broadcast against each other. Return the broadcasted shape as a tuple. See #17217 * Perform array allocations of size 0 for provided shape tuples Co-authored-by: Eric Wieser <wieser.eric@gmail.com> * Test for int as input shape Also update docstring to include both ints and tuples of ints as input * Remove unnecessary array_function_dispatch * Add missing set_module * Add release notes. Add versionadded to docstring. Also fix up docstring details. * follow convention for trailing comma Co-authored-by: Sebastian Berg <sebastian@sipsolutions.net> * Change name to broadcast_shapes. Also add test case, and type hint. * follow convention Co-authored-by: Eric Wieser <wieser.eric@gmail.com> * Update docstring Co-authored-by: Eric Wieser <wieser.eric@gmail.com> * Add reference to numpy docs on broadcasting to docstring Also move versionadded * Fix spelling Co-authored-by: Warren Weckesser <warren.weckesser@gmail.com> * Add broadcast_shapes to reference docs and add See Also sections Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Sebastian Berg <sebastian@sipsolutions.net> Co-authored-by: Warren Weckesser <warren.weckesser@gmail.com>
* | ENH: add dtype option to cov and corrcoef (#17456)Lisa Schwetlick2020-10-091-0/+5
| | | | | | | | | | | | | | Adds a keyword-only dtype parameter to correlate and coerrcoef to allow user to specify the dtype of the output. Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
* | Merge pull request #17419 from seberg/deprecate-coercion-to-subarray-dtypeMatti Picus2020-10-071-0/+24
|\ \ | | | | | | DEP: Deprecate coercion to subarray dtypes
| * | DEP: Deprecate coercion to subarray dtypesSebastian Berg2020-10-011-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When coercing to subarray dtypes, e.g. using `np.array(obj, dtype)`, but also `arr.astype(dtype)`, the behaviour was only well defined with tuple inputs, but not with array-like inputs. In particular, `arr.astype(dtype)` had arguably surprising behaviour of not converting by element, but rather attempting (and often failing) to broadcast `arr` to the result array with added dimensions. This deprecates all of these cases, the main issue would be for users relying on stranger inputs with broadcasted tuples contained in sequences: ``` np.array([((0, 1), (1, 2)), ((2,),)], dtype='(2,2)f4') ``` In most cases, where the tuples have the correct output shape, the new base dtype can be directly used since the discovered shape should match. However, there is no work-around for the above case. Closes gh-17173
* | | API: Special case how numpy scalars are coerced to signed integerSebastian Berg2020-10-011-5/+17
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This removes one of the larger changes to array-coercion, which meant that NumPy scalars were always coerced like a 0-D array would be (i.e. using normal casting). When the assignment is explicitly an integer, now `scalar.__int__()` will be used instead (as was the case previously). Since previously this was handled differently, a *single* scalar is still converted using casting: np.array(np.float64(np.nan), dtype=np.int64) succeeds, but any other thing fails, such as: np.array([np.float64(np.nan)], dtype=np.int64) arr1d_int64[()] = np.float64(np.nan) np.array(np.array(np.nan), dtype=np.int64) This does not affect Python scalars, that always raise, because they always are converted using `scalar.__int__()`. Unsigned integers always supported casting from their signed equivalent, so the difference is much less visible for them and this chooses to always use the casting behaviour. The main reason for this change is to help pands: https://github.com/pandas-dev/pandas/issues/35481
* | BLD: enabled negation of library choices in NPY_*_ORDER (#17219)Nick R. Papior2020-09-171-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BLD: enabled negation of library choices in NPY_*_ORDER When users build for a particular order it may be beneficial to disallow certain libraries. In particular a user may not care about which accelerated BLAS library is used, so long as the NetLIB or ATLAS library isn't used. This is now possible with: NPY_BLAS_ORDER='^blas,atlas' or NPY_BLAS_ORDER='!blas,atlas' Since we may envision more BLAS/LAPACK libraries to the pool, this will provide greater flexibility as they enter. A new (local) method is added in system_info.py which removes duplicate code and allows for easier usage across libraries.
* | ENH: Allow genfromtxt to unpack structured arrays (#16650)Andrew Eckart2020-09-111-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | * ENH: Allow genfromtxt to unpack structured arrays genfromtxt failed to transpose output when unpack=True and `dtype` was structured (or None). This patch resolves the issue by returning a list of arrays, as in `loadtxt`. Co-authored-by: Matti Picus <matti.picus@gmail.com> Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Sebastian Berg <sebastian@sipsolutions.net> Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
* | DOC: Add compatibility release note for gh-17241Charles Harris2020-09-031-0/+6
| | | | | | | | [skip ci]
* | Merge pull request #16134 from seberg/concatenate-dtypeMatti Picus2020-09-032-0/+14
|\ \ | | | | | | ENH: Implement concatenate dtype and casting keyword arguments
| * | Update doc/release/upcoming_changes/16134.compatibility.rstSebastian Berg2020-09-031-5/+5
| | | | | | | | | Co-authored-by: Matti Picus <matti.picus@gmail.com>
| * | ENH: Implement concatenate dtype and casting keyword argumentsSebastian Berg2020-09-022-0/+14
| | | | | | | | | | | | | | | | | | | | | Unfortunately, the casting was not consistent and sometimes used force casting (axis=None) while normally same kind casting was used. This thus deprecates the `force_casting` corner case, so that casting has to be provided in the future.
* | | DEP: Deprecated ndindex.ndincrEric Wieser2020-09-031-0/+4
|/ / | | | | | | The "do not use" comment has been here since bb0e4f356cce2f199d9c08ffe572fbabadc846d1.
* | BUG: revert trim_zeros changes from gh-16911mattip2020-08-271-7/+0
| |
* | Merge pull request #17116 from eric-wieser/expire-ctypes_load_librarySebastian Berg2020-08-201-0/+2
|\ \ | | | | | | API: Remove `np.ctypeslib.ctypes_load_library`
| * | API: Remove `np.ctypeslib.ctypes_load_library`Eric Wieser2020-08-201-0/+2
| | | | | | | | | | | | | | | | | | This function has been deprecated since fcee1ad856089a7ecb7b6865d280c0273dacb638 (Numpy v1.0b3). 14 years is more than enough time for users to switch from it.
* | | Merge pull request #17068 from charris/cleanup-pystring_fromstring-usageMatti Picus2020-08-201-0/+4
|\ \ \ | |/ / |/| | MAINT, BUG: Remove uses of PyString_FromString.
| * | MAINT: Remove uses of PyString_FromString.Charles Harris2020-08-191-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | We no longer need to use the compatibility function after dropping support for Python 2.7. In some cases unicode was the correct string type rather than the bytes of the compatibility version and bugs in the array `__complex__` and array `__array_interface__` methods have been fixed by changing that.
* | | Merge pull request #17058 from BvB93/trim_zeros2Matti Picus2020-08-191-1/+1
|\ \ \ | | | | | | | | MAINT: Revert boolean casting back to elementwise comparisons in `trim_zeros`
| * | | ENH: Use elementwise comparisons with 0 rather than boolean castingBas van Beek2020-08-111-1/+1
| |/ /