summaryrefslogtreecommitdiff
path: root/numpy/lib/histograms.py
Commit message (Collapse)AuthorAgeFilesLines
* 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.
* MAINT: Remove pointless axis permutationEric Wieser2018-04-081-9/+3
|
* MAINT: Remove redundant operations in 1d maskingEric Wieser2018-04-081-1/+1
| | | | `x1d[nonzero(mask1d)[0]]` is just a less readable way to spell `x1d[mask1d]`
* BUG: Use intp for indicesEric Wieser2018-04-061-1/+1
| | | | Fixes gh-8531
* DOC: Document the surprising behaviour of np.histogramdd on array_likesEric Wieser2018-04-061-4/+12
|
* MAINT/ENH: Reuse range computation code from np.histogram in np.histogramddEric Wieser2018-04-061-29/+15
| | | | This also adds support for inferring the range along a subset of the axes, rather than an all or nothing approach.
* MAINT: Give a more useful error messages for bins of an incorrect dimensionEric Wieser2018-03-261-2/+5
| | | | | | Previously gave `ValueError: object too deep for desired array` from an internal call This also adds support for 0d array bincounts
* MAINT: Only check bin monotonicity if not using linspaceEric Wieser2018-03-261-5/+6
| | | | | This also switches to doing comparisons rather than subtractions, for consistency with np.histogram. That change is not strictly necessary here as the arguments are not unsigned integer types (unlike in np.histogram), but it would nice to support integer bins in future.
* MAINT: Unify computation of `nbin[i]`Eric Wieser2018-03-261-3/+2
|
* MAINT: Make np.histogramdd error messages consistent with np.histogramEric Wieser2018-03-261-4/+4
|
* MAINT: The histogram_bin_edges function needs a raw docstring.Charles Harris2018-03-161-1/+1
|
* DOC: Move bin estimator documentation from `histogram` to `histogram_bin_edges`Eric Wieser2018-03-161-107/+75
|
* ENH: Add np.histogram_bin_edges (#10591)Kirit Thadaka2018-03-151-2/+126
| | | | | Fixes #10183 Documentation is copied from np.histogram
* Merge pull request #10618 from eric-wieser/avoid-nontuple-indicesMarten van Kerkwijk2018-03-151-1/+1
|\ | | | | MAINT: Stop using non-tuple indices internally
| * MAINT: Stop using non-tuple indices internallyEric Wieser2018-02-161-1/+1
| | | | | | | | | | | | By not using this type of indexing, it becomes easier for subclasses to override indexing in a way that works correctly with numpy functions. These locations were found by deprecating the behavior in question, which is deliberately not part of this commit
* | MAINT: Improve range error messages in np.histogram (#10603)Kirit Thadaka2018-02-201-7/+9
|/
* BUG: Fix crashes when using float32 values in uniform histogramsEric Wieser2018-02-021-7/+18
| | | | | | | | Fixes #8123, closes #9189, fixes #10319 This is a workaround to #10322, not a fix for it. Adds tests for cases where bounds are more precise than the data, which led to inconsistencies in the optimized path.
* MAINT: Extract helper function for last-bound-inclusive search_sortedEric Wieser2017-12-271-6/+16
| | | | Also avoids `r_`, and construction of arrays from lists
* ENH: Add support for datetimes to histogramsEric Wieser2017-12-261-9/+11
| | | | Currently only supported for explicit bins
* BUG: Allow nan values in the data when the bins are explicitEric Wieser2017-12-241-2/+4
| | | | | Fixes gh-7503 Closes gh-8984
* Merge pull request #10268 from eric-wieser/fix-gh-7864Charles Harris2017-12-241-1/+1
|\ | | | | BUG: Fix misleading error when coercing to array
| * BUG: Fix misleading error when coercing to arrayEric Wieser2017-12-241-1/+1
| | | | | | | | Closes gh-7864
* | MAINT: extract private helper function to compute histogram bin edgesEric Wieser2017-12-241-68/+91
|/
* MAINT: Extract helper functions from histogramEric Wieser2017-12-221-27/+44
|
* MAINT: Move histogram and histogramdd into their own moduleEric Wieser2017-12-101-0/+811
800 self-contained lines are easily enough to go in their own file, as are the 500 lines of tests. For compatibility, the names are still available through `np.lib.function_base.histogram` and `from np.lib.function_base import *` For simplicity of imports, all of the unqualified `np.` names are now qualified