summaryrefslogtreecommitdiff
path: root/numpy/lib/tests/test_histograms.py
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #11778 from eric-wieser/histogram-overflowCharles Harris2018-08-181-0/+14
|\ | | | | BUG: Avoid signed overflow in histogram
| * BUG: Avoid signed overflow in histogramEric Wieser2018-08-181-0/+14
| | | | | | | | | | | | | | | | | | 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-8/+8
|\ \ | | | | | | ENH: Add density argument to histogramdd.
| * | MAINT: Rename histogramdd's normed argument to density, to match histogramEric Wieser2018-07-081-8/+8
| | | | | | | | | | | | Fixes gh-4371
* | | Merge pull request #11428 from eric-wieser/deprecate-normed-1.15.0Charles Harris2018-06-271-0/+4
|\ \ \ | | | | | | | | BUG: Fix incorrect deprecation logic for histogram(normed=...) (master)
| * | | BUG: Fix incorrect deprecation logic for histogram(normed=...)Eric Wieser2018-06-261-0/+4
| | | | | | | | | | | | | | | | Fixes #11426, which was introduced in #11323 and #11352
* | | | Merge pull request #11373 from eric-wieser/histogramdd-densityCharles Harris2018-06-181-0/+36
|\ \ \ \ | |/ / / |/| / / | |/ / TST: Show that histogramdd's normed argument is histogram's density
| * | TST: Show that histogramdd's normed argument is histogram's densityEric Wieser2018-06-171-0/+36
| |/ | | | | | | Relevant to gh-4371
* | DEP: Actually deprecate the normed argument to histogramEric Wieser2018-06-151-19/+27
|/ | | | Documenting this argument at such length gives it authenticity it does not deserve.
* Merge pull request #11023 from eric-wieser/histogramdd-no-fuzzCharles Harris2018-05-141-3/+38
|\ | | | | BUG: np.histogramdd loses precision on its inputs, leading to incorrect results
| * BUG: histogramdd fails on large integersEric Wieser2018-04-301-0/+12
| | | | | | | | This is due to gh-11022.
| * ENH: Disable fuzzing on histogram boundariesEric Wieser2018-04-301-3/+26
| | | | | | | | | | | | | | | | | | | | 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: Misc. typos (#11005)luzpaz2018-04-301-1/+1
|/ | | | | | | | | User- and non-user-facing typos. Some source typos fixes as well. Found via `codespell`.
* ENH: Improve histogram bins="auto" for data with little variance (#10739)Varun Nayyar2018-04-091-0/+18
| | | Now falls back on sturges estimator when the IQR is zero
* MAINT: Remove all uses of run_module_suite.Charles Harris2018-04-061-9/+4
| | | | | That function is nose specific and has not worked since `__init__` files were added to the tests directories.
* TST: Switch to using pytest markersCharles Harris2018-04-041-1/+1
| | | | | | | | | | | Use standard pytest markers everywhere in the numpy tests. At this point there should be no nose dependency. However, nose is required to test the legacy decorators if so desired. At this point, numpy test cannot be run in the way with runtests, rather installed numpy can be tested with `pytest --pyargs numpy` as long as that is not run from the repo. Run it from the tools directory or some such.
* ENH: Add np.histogram_bin_edges (#10591)Kirit Thadaka2018-03-151-1/+15
| | | | | Fixes #10183 Documentation is copied from np.histogram
* BUG: Fix crashes when using float32 values in uniform histogramsEric Wieser2018-02-021-0/+47
| | | | | | | | 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.
* ENH: Add support for datetimes to histogramsEric Wieser2017-12-261-0/+25
| | | | Currently only supported for explicit bins
* BUG: Allow nan values in the data when the bins are explicitEric Wieser2017-12-241-0/+25
| | | | | Fixes gh-7503 Closes gh-8984
* BUG: Fix misleading error when coercing to arrayEric Wieser2017-12-241-0/+11
| | | | Closes gh-7864
* MAINT: Move histogram and histogramdd into their own moduleEric Wieser2017-12-101-0/+527
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