summaryrefslogtreecommitdiff
path: root/numpy/lib/histograms.py
Commit message (Collapse)AuthorAgeFilesLines
* DOC: fix extra space in error messageBerke Kocaoğlu2023-03-161-1/+1
|
* BUG: Histogramdd breaks on big arrays in Windows (#22561)Navpreet Singh2022-11-181-1/+1
| | | | | | | | | | | | | | | | | * BUG: Histogramdd breaks on big arrays in Windows Resolved the issue with line change from int to np.intp in numpy/numpy/lib/histograms.py * BUG: Histogramdd breaks on big arrays in Windows Resolved the issue with line change from int to np.intp in numpy/numpy/lib/histograms.py * Removed the binary files * Update test_histograms.py * Update test_histograms.py * Update test_histograms.py
* DOC: updated the description for array-like type in histogramddXinRu Lin2022-09-161-1/+1
|
* DEP: Remove `normed=` keyword argument from histogromsSebastian Berg2022-06-021-68/+9
| | | | | | The normed keyword argument has been deprecated for a long time. This removes it, replacing its position with the new density argument.
* Improve documentation formattingOscar Gustafsson2022-04-031-8/+8
|
* MAINT, DOC: discard repeated wordsDimitri Papadopoulos2022-01-131-2/+2
|
* Adjusted formulas to estimator and removed repeatJamie2021-02-101-2/+1
|
* Added sentence to docstring of histogram_bin_edgesJamie2021-02-061-1/+3
|
* DOC: Avoid using "set of" when talking about an ordered list.Antony Lee2020-12-291-1/+1
| | | | | | | | | | | | ... or when the input isn't/cannot be a set. I left a few usages, e.g. in random sampling, where "set" is reasonable as informal description of an array as the order doesn't matter; however, for e.g. np.gradient the order of the returned list is clearly important, so "set" is wrong. Also some other minor doc edits noticed during the grepping: using `shape` instead of `form` in `cov` is consistent with most other places; the wording in `Polynomial.trim` now matches other methods on the same class.
* ENH: Better error message when ``bins`` has float value in ``histogramdd``. ↵MatteoRaso2020-05-071-1/+9
| | | | | | | | (#16129) * Improved one of the error messages for histogramdd.py as outlined in issue #15984 Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
* ENH: Fix exception causes in four .py fileskeremh2020-04-241-2/+2
|
* DOC: Minor fix to _hist_bin_fd documentation (#15839)nglinh2020-04-031-1/+1
| | | Co-Authored-By: Ross Barnowski <rossbar@berkeley.edu>>
* DOC: Fix docstring for _hist_bin_auto.Ross Barnowski2020-03-271-5/+5
| | | | | * "bandwidth" -> "bin width" * Minor grammatical fixes
* MAINT: Replace basestring with str.Charles Harris2020-01-231-2/+1
| | | | | | | This replaces basestring with str except in - tools/npy_tempita/ - numpy/compat/py3k.py
* MAINT: Fix mistype in histogramdd docstringKirill Zinovjev2020-01-191-2/+2
|
* MAINT: Remove unnecessary 'from __future__ import ...' statementsJon Dufresne2020-01-031-2/+0
| | | | | As numpy is Python 3 only, these import statements are now unnecessary and don't alter runtime behavior.
* BUG: lib: Fix histogram problem with signed integer arrays.Warren Weckesser2019-10-151-5/+15
| | | | | | | | | | | | | | | | | | | | An input such as np.histogram(np.array([-2, 0, 127], dtype=np.int8), bins="auto") would raise the exception ValueError: Number of samples, -1, must be non-negative. The problem was that the peak-to-peak value for the input array was computed with the `ptp` method, which returned negative values for signed integer arrays when the actual value was more than the maximum signed value of the array's data type. The fix is to use a peak-to-peak function that returns an unsigned value for signed integer arrays. Closes gh-14379.
* MAINT: spellingStephan Hoyer2019-06-111-1/+1
|
* MAINT: fix histogram*d dispatchersStephan Hoyer2019-06-111-1/+8
| | | | fixes GH-13728
* BUG: Increment stacklevel for warnings to account for NEP-18 overrides (#13589)Stephan Hoyer2019-05-201-5/+6
| | | | | | | | | | | | | | * Increment stacklevel for warnings to account for NEP-18 overrides For NumPy functions that make use of `__array_function__`, the appropriate the stack level for warnings should generally be increased by 1 to account for the override function defined in numpy.core.overrides. Fixes GH-13329 * Update numpy/lib/type_check.py Co-Authored-By: Sebastian Berg <sebastian@sipsolutions.net>
* DOC: have notes in histogram_bin_edges match parameter styleRyan Levy2019-05-051-7/+7
| | | | bins only accepts lowercase strings, but the notes are capitalized.
* DOC: fixes from reviewmattip2019-01-221-0/+1
|
* DOC: remove python2-only methods, small cleanupsmattip2019-01-211-1/+2
|
* TST, DOC: enable refguide_checkTyler Reddy2018-12-141-4/+5
| | | | | | | | * ported the refguide_check module from SciPy for usage in NumPy docstring execution/ verification; added the refguide_check run to Azure Mac OS CI * adjusted NumPy docstrings such that refguide_check passes
* resolve issues from reviewguoci2018-11-201-2/+5
|
* DOC: mention LOOCV in description of "stone" rule.Stephan Hoyer2018-11-201-2/+2
|
* ENH: Add 'ise' estimator to np.histogramguoci2018-11-201-11/+62
|
* ENH: set correct __module__ for objects in numpy's public APIStephan Hoyer2018-11-131-1/+5
| | | | | | | | | | | | | Fixes GH-12271 Tests verify that everything in ``dir(numpy)`` either has ``__module__`` set to ``'numpy'``, or appears in an explicit whitelist of undocumented functions and exported bulitins. These should eventually be documented or removed. I also identified a handful of functions for which I had accidentally not setup dispatch for with ``__array_function__`` before, because they were listed under "ndarray methods" in ``_add_newdocs.py``. I guess that should be a lesson in trusting code comments :).
* Merge pull request #12116 from shoyer/array-function-numpy-libCharles Harris2018-10-111-0/+18
|\ | | | | ENH: __array_function__ support for np.lib, part 1/2
| * ENH: __array_function__ for np.lib, part 1Stephan Hoyer2018-10-081-0/+18
| | | | | | | | np.lib.arraypad through np.lib.nanfunctions
* | BUG: Allow boolean subtract in histogramMatthew Bowden2018-10-101-0/+8
|/ | | | | | | | | | | Convert bool to uint at start, rather than attempt a XOR Only check type against np.bool_ Refactor warnings check
* Merge pull request #11778 from eric-wieser/histogram-overflowCharles Harris2018-08-181-3/+29
|\ | | | | BUG: Avoid signed overflow in histogram
| * BUG: Avoid signed overflow in histogramEric Wieser2018-08-181-3/+29
| | | | | | | | | | | | | | | | | | When dividing the range between first and last, the formula `(x - first) / (last - first)` is used, where `last >= first` This falls apart if the types of these variables are signed integers, in which case overflow can occur. The solution is to force the subtraction result to be unsigned. This is a regression in 1.15.0
* | Merge pull request #11531 from eric-wieser/histogramdd-density-no-deprecationCharles Harris2018-07-081-5/+21
|\ \ | | | | | | ENH: Add density argument to histogramdd.
| * | MAINT: Rename histogramdd's normed argument to density, to match histogramEric Wieser2018-07-081-5/+21
| |/ | | | | | | Fixes gh-4371
* | Merge pull request #11428 from eric-wieser/deprecate-normed-1.15.0Charles Harris2018-06-271-1/+1
|\ \ | | | | | | BUG: Fix incorrect deprecation logic for histogram(normed=...) (master)
| * | BUG: Fix incorrect deprecation logic for histogram(normed=...)Eric Wieser2018-06-261-1/+1
| | | | | | | | | | | | Fixes #11426, which was introduced in #11323 and #11352
* | | Merge pull request #11371 from eric-wieser/clarify_bin_orderCharles Harris2018-06-181-3/+4
|\ \ \ | |/ / |/| | DOC: Clarify requirement that histogram bins are monotonic.
| * | DOC: Clarify requirement that histogram bins are monotonic.Eric Wieser2018-06-171-3/+4
| |/ | | | | | | Close gh-631
* | DEP: Actually deprecate the normed argument to histogramEric Wieser2018-06-151-10/+32
|/ | | | Documenting this argument at such length gives it authenticity it does not deserve.
* BUG: histogramdd fails on large integersEric Wieser2018-04-301-1/+2
| | | | This is due to gh-11022.
* ENH: Disable fuzzing on histogram boundariesEric Wieser2018-04-301-21/+8
| | | | | | | | | | Previously a fuzzy rounded comparison was used for the rightmost bin of histogramdd. It's not clear why this was done, and it resulted in surprising behavior. This also removes the restriction that bin edges must be floats, and allows integer arrays to be passed (and returned) Fixes gh-10864
* MAINT: Remove unnecessary special case for N == 0Eric Wieser2018-04-101-4/+0
|
* ENH: Improve histogram bins="auto" for data with little variance (#10739)Varun Nayyar2018-04-091-9/+22
| | | Now falls back on sturges estimator when the IQR is zero
* MAINT: Don't use np.arange just because `range` is shadowedEric Wieser2018-04-081-7/+11
| | | | Creates an alias instead
* MAINT: Use the minlength argument of bincount to avoid a copy into a larger ↵Eric Wieser2018-04-081-8/+4
| | | | | | array The result is left as a float, even though it no longer needs to be, as this commit aims not to change behavior.
* MAINT: Don't reimplement `ravel_multi_index`Eric Wieser2018-04-081-3/+2
|
* MAINT: Don't use a dict with numeric keys when a tuple would do fineEric Wieser2018-04-081-3/+4
|
* MAINT: Remove asarray call on a known arrayEric Wieser2018-04-081-2/+0
|
* MAINT: Remove dead code.Eric Wieser2018-04-081-3/+0
| | | | len(xy) == N, and we already checked if N == 0 above.