summaryrefslogtreecommitdiff
path: root/numpy/lib/tests
Commit message (Collapse)AuthorAgeFilesLines
...
| | | * | | | Merge pull request #10855 from madphysicist/unpack-countSebastian Berg2019-02-251-0/+63
| | | |\ \ \ \ | | | | | | | | | | | | | | | | ENH: Adding a count parameter to np.unpackbits
| | | | * | | | ENH: Added count parameter to unpackbitsJoseph Fox-Rabinovitz2019-02-251-0/+63
| | | | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tests are included. Couple of minor fixes: - Fixed packbits/unpackbits docs to reflect proper keyword names - Added .pytest_cache to .gitignore
| | | * | | | ENH: Improve handling of infinities in np.interpEric Wieser2019-02-241-1/+70
| | | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Alternative to gh-12978, using a method that does not need a lot of special cases. This is likely more robust in the face of overflow Fixes gh-12951.
| | | * | | TST: Improve and refactor tests for numpy.padLars Grueter2019-02-141-223/+224
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * TST: Move test for negative stat_length and extend coverage to all modes and more variations of a negative stat_length. * TST: Merge tests for pad_width in single class * TST: Test behavior of pad's kwargs for all modes * TST: Move test to TestReflect Can be grouped with already existing test class checking the behavior for the reflect mode. * TST: Simplify regression test for object input * TST: Move testing pad_width as ndarray Can be grouped in class TestPadWidth as this test checks if an ndarray is accepted as the value to pad_width * TST: Remove faulty tests for pad_width's type These test were ineffective. The TypeError raised in these test was not actually due to pad_width receiving the wrong type but due to the missing parameter mode. Added missing type complex to the appropriate existing test checking for pad_widths type behavior. * TST: Move test for pad_width of zero * TST: Move test for simple stat_length * TST: Simplify classes with only one test * TST: Add naive test for non-contiguous arrays * MAINT: Don't import pad directly Using np.pad instead of directly importing the function seems to be more inline with other test modules. * STY: Make class layout consistent in module * TST: Fix match-string for missing pad mode error The CLI fails due to error message containing a reference to _pad_dispatcher() being returned instead of pad(). For some reason this test passes when run locally.
| | | * | | ENH: add _nan_mask functionTyler Reddy2019-01-181-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * add _nan_mask function and associated unit tests; this function is to be used to simplify reduction operations involving np.nan elements by using a mask with a ``where`` argument
| | | * | | BUG: loosen kwargs requirements in ediff1dmattip2019-01-101-4/+4
| | | | | |
| | | * | | BUG: reference cycle in np.vectorize (#11977)Matti Picus2019-01-091-2/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This implements cyclic support by adding `tp_traverse` to ufuns which may contain a user provided object function (`np.frompyfunc`). Ufuncs that do not add this are not added to the circular reference count tracking. The ufunc does not need to implement `tp_clear` because it is an immutable object.
| | | * | | ENH: remove "Invalid value" warnings from median, percentilemattip2019-01-061-69/+26
| | | | | |
| | | * | | TST: Fix endianness in unstuctured_to_structured testAllan Haldane2019-01-051-3/+3
| | | | | |
| | * | | | BUG: Return the coefficients array directlyEric Wieser2017-07-081-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Turns out that this was relied upon downstream We also add a setter for coeffs, so that augmented assignment does not both change state and raise an exception suggesting state could not be changed.
| * | | | | BUG: Fix structured_to_unstructured on single-field typesEric Wieser2019-04-151-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously a single-field type would decay, which is undesirable. The included test previously did not pass
* | | | | | BUG: recfunctions: Don't return None in place of empty sequencesEric Wieser2019-08-191-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replacing empty tuples with `None` is a bad idea, and just results in an API that is hard to consume - especially since the behavior was never documented. This affects `get_names`, `get_names_flat`, and `get_fieldstructure`.
* | | | | | BUG: Fix crash on genfromtxt with nested empty structured arrayEric Wieser2019-08-191-0/+7
| |_|/ / / |/| | | | | | | | | | | | | | Previously this would fail with `ValueError: could not assign tuple of length 2 to structure with 3 fields.`, now it raises `NotImplementedError`.
* | | | | Merge pull request #12388 from mhvk/linspace-allow-arrayCharles Harris2018-12-061-4/+4
|\ \ \ \ \ | | | | | | | | | | | | ENH: allow arrays for start and stop in {lin,log,geom}space
| * | | | | TST,BUG: fix two tests that were setup incorrectly.Marten van Kerkwijk2018-12-041-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | And which failed with the change to linspace.
* | | | | | MAINT: Review F401,F841,F842 flake8 errors (unused variables and imports) ↵Roman Yurchak2018-12-066-12/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#12448) * Review F401,F841,F842 flake8 errors (unused variables, imports) * Review comments * More tests in test_installed_npymath_ini * Review comments
* | | | | | ENH: implement matmul on NDArrayOperatorsMixin (#12488)Stephan Hoyer2018-12-051-0/+11
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | * ENH: implement matmul on NDArrayOperatorsMixin * MAINT: remove unnecessary pytest import
* | | | | Merge pull request #12447 from ahaldane/unrevert_multifield_viewCharles Harris2018-12-011-0/+10
|\ \ \ \ \ | | | | | | | | | | | | ENH: add back the multifield copy->view change
| * | | | | ENH: add back the multifield copy->view changeAllan Haldane2018-11-261-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes #10409 Closes #11530
* | | | | | Merge pull request #12443 from rth/set-litteralEric Wieser2018-12-012-3/+3
|\ \ \ \ \ \ | | | | | | | | | | | | | | MAINT Use set litterals
| * | | | | | Use set litteralsRoman Yurchak2018-11-242-3/+3
| |/ / / / /
* | | | | | Merge pull request #12446 from ahaldane/recfunctions_fixupsCharles Harris2018-11-291-0/+13
|\ \ \ \ \ \ | | |/ / / / | |/| | | | MAINT: Fixups to new functions in np.lib.recfunctions
| * | | | | MAINT: Fixups to new functions in np.lib.recfunctionsAllan Haldane2018-11-261-0/+13
| |/ / / /
* | | | | Merge pull request #11197 from wummo/correct_covariance_scalingMarten van Kerkwijk2018-11-271-10/+40
|\ \ \ \ \ | |/ / / / |/| | | | BUG/ENH: Removed non-standard scaling of the covariance matrix and added option to disable scaling completely.
| * | | | Removed non-standard scaling of the covariance matrix and added option to ↵Andreas Nussbaumer2018-11-211-10/+40
| | | | | | | | | | | | | | | | | | | | disable scaling completely.
* | | | | Merge pull request #11526 from ahaldane/add_struct_helper_funcs_redoCharles Harris2018-11-231-1/+60
|\ \ \ \ \ | | | | | | | | | | | | ENH: add multi-field assignment helpers in np.lib.recfunctions
| * | | | | ENH: Fixups to multi-field assignment helpersAllan Haldane2018-11-221-0/+8
| | | | | |
| * | | | | ENH: add multi-field assignment helpers in np.lib.recfunctionsAllan Haldane2018-10-311-1/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds helper functions for the copy->view transition for multi-field indexes. Adds `structured_to_unstructured`, `apply_along_fields`, `assign_fields_by_name`, `require_fields`.
* | | | | | resolve issues from reviewguoci2018-11-201-2/+2
| | | | | |
* | | | | | ENH: Add 'ise' estimator to np.histogramguoci2018-11-201-12/+32
| |/ / / / |/| | | |
* | | | | MAINT: Rewrite shape normalization in pad function (#11966)Lars Grüter2018-11-151-0/+86
| | | | |
* | | | | Merge pull request #12381 from tylerjereddy/datasource_del_handlingCharles Harris2018-11-151-0/+15
|\ \ \ \ \ | | | | | | | | | | | | BUG: graceful DataSource __del__ when __init__ fails
| * | | | | BUG: improve DataSource __del__Tyler Reddy2018-11-131-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * DataSource __del__ could raise an AttributeError if __init__ failed for any reason; __del__ now gracefully handles the case where __init__ fails, as happens in the internals of refguide_check when handling DataSource with an unexpected kwarg
* | | | | | BUG: fix for titles, cleanup, fixes from reviewmattip2018-11-131-1/+5
| | | | | |
* | | | | | BUG: test, fix loading structured dtypes with paddingmattip2018-11-131-1/+20
|/ / / / /
* | | | | Merge pull request #12241 from tylerjereddy/histogramdd_test_arg_branchCharles Harris2018-11-121-0/+17
|\ \ \ \ \ | | | | | | | | | | | | TST: arg handling tests in histogramdd
| * | | | | TST: arg handling tests in histogramddTyler Reddy2018-10-221-0/+17
| | | | | |
* | | | | | ENH: Improve support for pathlib.Path objects in load functions (#11348)Paul Müller2018-11-011-1/+25
| |/ / / / |/| | | | | | | | | * ENH: Improve support for pathlib.Path objects in more functions
* | | | | DEP: deprecate passing a generator to stack functionsStephan Hoyer2018-10-271-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes gh-12263 We can't support generators with dispatch for ``__array_function__``.
* | | | | BUG: Revert linspace import for concatenation funcs (#12265)James Bourbeau2018-10-261-0/+5
| | | | | | | | | | | | | | | BUG: test and fix import linspace in index_tricks
* | | | | TST: tests for sort_complex()Tyler Reddy2018-10-221-0/+26
|/ / / /
* | | | TST: unit tests for column_stack.Tyler Reddy2018-10-191-0/+20
| | | |
* | | | Merge pull request #12216 from tylerjereddy/hist_range_test_sanityEric Wieser2018-10-181-0/+6
|\ \ \ \ | | | | | | | | | | TST: test invalid histogram range
| * | | | TST: test invalid histogram rangeTyler Reddy2018-10-181-0/+6
| | | | |
* | | | | TST: test histogram bins dimsTyler Reddy2018-10-181-0/+7
|/ / / /
* | | | Merge pull request #12153 from tylerjereddy/setdiff1d_test_covCharles Harris2018-10-171-0/+7
|\ \ \ \ | | | | | | | | | | DOC, TST: cover setdiff1d assume_unique
| * | | | DOC, TST: test setdiff1d assume_uniqueTyler Reddy2018-10-161-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * add unit test for setdiff1d covering code path where assume_unique is True * remove setdiff1d docstring guarantee that returned value is sorted -- it is not
* | | | | DEP: Updated unravel_index() kwargs to support `shape`Tyler Reddy2018-10-161-1/+29
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * unravel_index() now supports the shape argument (Fixes #10586) while retaining backwards compatibility for the dims argument * added corresponding unit tests and docstring changes * updated compatibility release notes
* | | | TST: test byte_bounds contiguity handlingTyler Reddy2018-10-151-4/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * add unit tests to probe previously-uncovered code paths in byte_bounds() that handle both positive and negative strides in non-contiguous arrays (or, at least, arrays with unusual ordering)
* | | | TST: add test for weighted histogram mismatchTyler Reddy2018-10-141-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | * add a unit test for an uncovered code path where a histogram array does not match the shape of the provided array of weights