summaryrefslogtreecommitdiff
path: root/numpy/core/fromnumeric.py
Commit message (Collapse)AuthorAgeFilesLines
* DOC:clarify differences between ravel and reshape(-1)渡邉 美希2023-05-111-4/+6
|
* DOC: Removed `.shape` setting note from reshape (#23491)JoryKlaverstijn2023-03-311-18/+3
| | | | | | | | | | | | | | * DOC: Changed the example for modifying the shape without modifying the initial object * DOC: Removed the example for directly assigning a tuple to the shape attribute of a numpy array * DOC: Re-added note about copying data when reshaping an array to numpy.reshape docs * DOC: reformat for linting --------- Co-authored-by: Jory Klaverstijn <j.klaverstijn@student.rug.nl> Co-authored-by: Matti Picus <matti.picus@gmail.com>
* DOC: Fix typos & grammer in docstrings and comments (#23503)Pratyay Banerjee2023-03-301-1/+1
|
* MAINT: remove `NUMPY_EXPERIMENTAL_ARRAY_FUNCTION` env varRalf Gommers2023-03-121-20/+0
| | | | | | | | As discussed in https://mail.python.org/archives/list/numpy-discussion@python.org/thread/UKZJACAP5FUG7KP2AQDPE4P5ADNWLOHZ/ This flag was always meant to be temporary, and cleaning it up is long overdue.
* DEP: update deprecations for `np.product` and co to emit from dispatcherRalf Gommers2023-03-101-25/+68
| | | | | | This follows up on a review comment on gh-23314 [skip cirrus] [skip circle]
* DOC: Clearer docstring for repeat (#23348)Pierre2023-03-071-1/+1
|
* MAINT: add dates/versions to deprecations, fix linter complaintRalf Gommers2023-03-021-0/+5
| | | | [skip cirrus] [skip circle]
* DEP: deprecate `product`, `cumproduct`, `sometrue`, `alltrue`Ralf Gommers2023-03-021-0/+28
| | | | [skip cirrus]
* MAINT: switch min/max with amin/amax, and add them to html docsRalf Gommers2023-03-011-33/+70
| | | | Closes gh-13877
* DOC: add `np.round` to the html docs, and make it the preferred aliasRalf Gommers2023-03-011-13/+26
| | | | | | | | | | The function is more commonly called `round`, both in the array API standard and in other array libraries (e.g., PyTorch has `round` but not around). Plus we have `ndarray.round`. `around` is heavily used, so keep it as an alias - but prefer `round`. For both this switch and for keeping the alias, xref gh-13877. Closes gh-19717
* DEP: deprecate `np.round_`Ralf Gommers2023-02-281-1/+11
| | | | Closes gh-22617
* DOC: Update the docstring for `np.round_` to disrecommend it (#22527)Inessa Pawson2023-02-281-2/+6
| | | [skip ci]
* MAINT: Fix stacklevels for the new C dispatcher not adding oneSebastian Berg2023-01-171-1/+1
|
* DOC: Add note to clarify relationship between round and around (#21853)Inessa Pawson2022-10-191-1/+2
| | | | | | Improve docstring to clarify the relationship between np.round and np.around Co-authored-by: Mukulika Pahari <mukulikapahari@gmail.com>, Aparna Bushan <aparna.bushan@auto-grid.com> Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
* DOC: Update amin/amax return description. (#22362)Muhammad Jarir Kanji2022-09-301-4/+6
| | | | Update return description to account for case when axis is a tuple of integers, noting the shape of the returned array.
* Merge pull request #22297 from sanjanamm98/np.prod-example-issue#22266Sebastian Berg2022-09-281-3/+6
|\ | | | | DOC: Add example to np.prod
| * DOC: Apply Chuck's suggestion.Ross Barnowski2022-09-271-5/+5
| | | | | | | | Co-authored-by: Charles Harris <charlesr.harris@gmail.com>
| * Added example to np.prodSanjana M Moodbagil2022-09-161-0/+3
| |
* | DOC: Update for return value of np.ptp() (#22276)Digya0532022-09-191-3/+3
|/ | | | | | | | | | | * Update documentation for return value of np.ptp() * Update integer value to scalar to accomodate other numeric data types * Add examples to np.char.isdigit() * Remove extra space and example Closes gh-18719
* DOC: More copy-editing of 'partition' docstring.warren2022-08-181-6/+6
| | | | [skip actions] [skip travis] [skip azp]
* DOC: Copy-edit the 'partition' docstring.warren2022-08-181-9/+27
| | | | Closes gh-7958.
* DOC: Add missing wordGreg Sadetsky2022-08-171-1/+1
|
* DOC: unify `np.transpose`, `np.ndarray.transpose`, and `np.ndarray.T` (#21997)Petar Mlinarić2022-07-191-29/+37
| | | | | | Better organize and improve cross referencing between the various transpose functions/methods. Co-authored-by: Rohit Goswami <r95g10@gmail.com>
* DOC: Fix axis naming in `argpartition` docs (#21098)ADARSH SINGH2022-05-251-1/+1
| | | | | | | | | | | * Update fromnumeric.py Fixing DOC: typo on website for numpy.argpartition #21093 * Update fromnumeric.py Fixing Typo Co-authored-by: Sebastian Berg <sebastian@sipsolutions.net>
* DOC: typo corrected in numpy.argpartition (#21201)Diwakar Gupta2022-03-161-2/+2
| | | | | * DOC: numpy.argpartition typo corrected Co-authored-by: Matti Picus <matti.picus@gmail.com>
* DOC: Remove the confusing "unless not" in numpy/core/fromnumeric.pyKassian Sun2022-03-141-1/+1
|
* DOC: fix formatting of mean examplemgunyho2022-01-201-0/+1
|
* Merge pull request #20399 from timhoffm/doc-linkMelissa Weber Mendonça2021-11-221-5/+7
|\
| * Improve See Also of ndarray.shapeTim Hoffmann2021-11-201-2/+3
| |
| * Make numpy.shape examples less ambiguousTim Hoffmann2021-11-181-4/+5
| | | | | | | | | | - The shape shound not coincidetially contain the same numbers as the data - For structured arrays, the shape should not coincide with the number of fields
| * Document what len(a) is in See Also of numpy.shapeTim Hoffmann2021-11-181-1/+1
| |
* | DEP: remove deprecated `np.alen` functionRalf Gommers2021-11-211-46/+1
|/ | | | Was deprecated in 1.18.0
* DOC: Add `versionadded` directives for the argmin/-max `keepdims` parameterBas van Beek2021-10-041-0/+4
|
* BUG,DEP: Allow (arg-)partition to accept `uint64` indices (#20000)Bas van Beek2021-10-021-0/+6
| | | | | | | | | | | | | | | | | * BUG: Allow (arg-)partition to accept `uint64` indices * DEP: Deprecate the use of booleans as (arg-)partition indices * TST,DEP: Add tests for the `parametrize` bool-index-deprecation * TST: Add more dtype-based tests for (arg-)partition * DOC: Add a release note for the (arg-)partition boolean deprecation * DEP: Explicitly mention numpy 1.22 in the (arg-)partition deprecation warning Co-Authored-By: Sebastian Berg <sebastian@sipsolutions.net> Co-authored-by: Sebastian Berg <sebastian@sipsolutions.net>
* Remove reference since it's not used (#19766)Illviljan2021-08-271-3/+0
|
* Fix so doctest passesIllviljan2021-08-271-3/+3
|
* DOC: fix see also references in numpy.resize (#19475)Niko Savola2021-07-141-3/+3
|
* ENH: Adding keepdims to np.argmin,np.argmax (#19211)Gagandeep Singh2021-07-071-8/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * keepdims added to np.argmin,np.argmax * Added release notes entry * tested for axis=None,keepdims=True * Apply suggestions from code review * updated interface * updated interface * API changed, implementation to be done * Added reshape approach to C implementation * buggy implementation without reshape * TestArgMax, TestArgMin fixed, comments added * Fixed for matrix * removed unrequired changes * fixed CI failure * fixed linting issue * PyArray_ArgMaxKeepdims now only modifies shape and strides * Comments added to PyArray_ArgMaxKeepdims * Updated implementation of PyArray_ArgMinKeepdims to match with PyArray_ArgMaxKeepdims * Testing complete for PyArray_ArgMinKeepdims and PyArray_ArgMaxKeepdims * PyArray_ArgMinWithKeepdims both keepdims=True and keepdims=False * matched implementation of PyArray_ArgMaxKeepdims and PyArray_ArgMinKeepdims * simplified implementation * Added missing comment * removed unwanted header * addressed all the reviews * Removing unwanted changes * fixed docs * Added new lines * restored annotations * parametrized test * Apply suggestions from code review Co-authored-by: Sebastian Berg <sebastian@sipsolutions.net> * keyword handling now done in np.argmin/np.argmax * corrected indendation * used with pytest.riases(ValueError) * fixed release notes * removed PyArray_ArgMaxWithKeepdims and PyArray_ArgMinWithKeepdims from public C-API * Apply suggestions from code review Co-authored-by: Eric Wieser <wieser.eric@gmail.com> * Apply suggestions from code review Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Sebastian Berg <sebastian@sipsolutions.net> Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
* DOC: change more np.min/np.max to np.amin/np.amaxHenry Schreiner2021-06-291-8/+8
| | | | | | A few places were missed, so the docs switched back to `np.min`/`np.max` partway through the examples. These are not statically typed anymore since 1.21.
* DOC: Explicitly mention that `searchsorted` returns an integer if `v` is a ↵Bas van Beek2021-06-031-6/+7
| | | | scalar
* DOC: Improve cumsum documentation (#18895)Atharva-Vidwans2021-05-161-0/+12
| | | | | Add note and example potential differences with np.sum. Co-authored-by: Matti Picus <matti.picus@gmail.com>
* MAINT: Remove unnecessary dash for the dividing linePatrick2021-04-171-1/+1
| | | Co-authored-by: Matthias Bussonnier <bussonniermatthias@gmail.com>
* MAINT: change argument type in numpy.clip documentation examplexamm2021-04-161-1/+1
| | | | from keyword to positional as suggested by reviewer
* DOC: add note for clip() special case a_min > a_max See #18782xamm2021-04-161-2/+12
|
* ENH: Use new argument parsing for array creation functionsSebastian Berg2021-03-181-2/+1
| | | | | | | | | | | | | | | | | | 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)
* Merge pull request #16588 from SabrinaSimao/np.transpode-documentationMelissa Weber Mendonça2021-02-171-0/+3
|\ | | | | DOC: unify the docs for np.transpose and ndarray.transpose
| * DOC: changed the way the link is being used from transpose to ndarray.transposeSabrinaSimao2020-06-121-1/+3
| | | | | | | | I feel like the `ndarray.transpose` has more details, and it's also called by `transpose`, so i changed the way the link between them was being used
| * unify the docs for np.transpose and ndarray.transposeSabrinaSimao2020-06-121-0/+1
| |
* | DOC: Misc numpydoc format fixesMatthias Bussonnier2021-01-271-6/+3
| | | | | | | | | | | | | | | | | | Via prototype docstring autoreformatter; and cherry-picked to mostly include spacing issues around colons in parameters and see also. When no space is present numpydoc tend to miss-parse those sections A couple of typos are fixed as well.
* | DOC: Misc single to double backticks fixes.Matthias Bussonnier2021-01-241-17/+17
| | | | | | | | | | | | | | | | As usual, single backtics are for references, double for verbatim. Rewrap the paragraph when necessary, Change also a couple of mode=xxx to mode='xxx' as well.