| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
This follows up on a review comment on gh-23314
[skip cirrus] [skip circle]
|
| |
|
|
|
|
| |
[skip cirrus] [skip circle]
|
|
|
|
| |
[skip cirrus]
|
|
|
|
| |
Closes gh-13877
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Closes gh-22617
|
|
|
| |
[skip ci]
|
| |
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Update return description to account for case when axis is a tuple
of integers, noting the shape of the returned array.
|
|\
| |
| | |
DOC: Add example to np.prod
|
| |
| |
| |
| | |
Co-authored-by: Charles Harris <charlesr.harris@gmail.com>
|
| | |
|
|/
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
| |
[skip actions] [skip travis] [skip azp]
|
|
|
|
| |
Closes gh-7958.
|
| |
|
|
|
|
|
|
| |
Better organize and improve cross referencing between the various transpose
functions/methods.
Co-authored-by: Rohit Goswami <r95g10@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
| |
* 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: numpy.argpartition typo corrected
Co-authored-by: Matti Picus <matti.picus@gmail.com>
|
| |
|
| |
|
|\ |
|
| | |
|
| |
| |
| |
| |
| | |
- 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
|
| | |
|
|/
|
|
| |
Was deprecated in 1.18.0
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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>
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
scalar
|
|
|
|
|
| |
Add note and example potential differences with np.sum.
Co-authored-by: Matti Picus <matti.picus@gmail.com>
|
|
|
| |
Co-authored-by: Matthias Bussonnier <bussonniermatthias@gmail.com>
|
|
|
|
| |
from keyword to positional as suggested by reviewer
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|\
| |
| | |
DOC: unify the docs for np.transpose and ndarray.transpose
|
| |
| |
| |
| | |
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
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|