summaryrefslogtreecommitdiff
path: root/numpy/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* | | Merge pull request #9294 from b-carter/fix_histogram_monotonicity_checkEric Wieser2017-09-242-1/+9
|\ \ \ | | | | | | | | BUG: Fixes histogram monotonicity check for unsigned bin values
| * | | allow non-strictly increasing binsBrandon Carter2017-08-191-1/+1
| | | |
| * | | minor change to the logicBrandon Carter2017-06-251-1/+1
| | | |
| * | | BUG: fixes unsigned bins monotonicity check, see #9222Brandon Carter2017-06-241-1/+1
| | | |
| * | | TST: add test for unsigned bins monotonicity check, see #9222Brandon Carter2017-06-241-0/+8
| | | |
* | | | MAINT: Use zip, not enumerateEric Wieser2017-09-211-17/+18
| | | | | | | | | | | | | | | | Double-indexing is just a little harder to read
* | | | Merge pull request #9408 from eric-wieser/gradient-fixCharles Harris2017-09-212-8/+20
|\ \ \ \ | | | | | | | | | | BUG: various fixes to np.gradient
| * | | | MAINT: Use clearer variableEric Wieser2017-07-131-1/+1
| | | | |
| * | | | BUG: Use np.ndim not asarray, to allow duck-typesEric Wieser2017-07-131-7/+6
| | | | |
| * | | | BUG: Only allow 1d distance arraysEric Wieser2017-07-132-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2d arrays would work, but in unpredictable and undocumented ways. This at least makes gh-9401 give a better error message.
| * | | | BUG: Allow 0d arrays instead of scalars in gradientEric Wieser2017-07-132-8/+15
| | | | | | | | | | | | | | | | | | | | This fixes gh-8292
* | | | | ENH Better error message for savetxt when X.ndim > 2Nelle Varoquaux2017-09-202-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | savetxt does not support saving arrays of dimension 0 or higher than 2. This pull request improves the message of the error raised.
* | | | | DOX: Fix mistaken word in nanprod docstring (#9703)Robert T. McGibbon2017-09-171-1/+1
| | | | |
* | | | | ENH: Align data in np.save() at 64 bytes (#9025)John Zwinck2017-09-132-22/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, saving format version 1 would align to 16 bytes, and saving version 2 would align improperly (bug #8085). Alignment is now always at least 64 bytes in either version, which supports memory mapping of the saved files on Linux, where mmap() offset must be a multiple of the page size. Why 64 bytes? Simply because we don't know of a case where more is needed. AVX alignment is 32 bytes; AVX-512 is 64. Fixes #8085, closes #8598.
* | | | | DOC: Correct the signature in pad doc for callable mode.Michael Seifert2017-09-101-8/+14
| | | | | | | | | | | | | | | | | | | | [skip ci]
* | | | | Merge pull request #6053 from ahaldane/multifield_structassignCharles Harris2017-09-091-2/+2
|\ \ \ \ \ | | | | | | | | | | | | MAINT: struct assignment "by field position", multi-field indices return views
| * | | | | TST: Fix/Remove old unit tests for structure assignmentAllan Haldane2017-09-071-2/+2
| | | | | |
* | | | | | Merge pull request #9649 from MSeifert04/doc_apply_along_axis_doctestEric Wieser2017-09-081-2/+0
|\ \ \ \ \ \ | |/ / / / / |/| | | | | DOC: Fixed doc example of apply along axis with 3D return
| * | | | | DOC: Fixed doctest of apply along axis with 3D returnMichael Seifert2017-09-061-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | [skip ci]
* | | | | | BUG: fix padding an empty array in reflect mode.Iryna Shcherbina2017-09-012-3/+15
|/ / / / / | | | | | | | | | | | | | | | Check that axes with non-zero padding are non-empty.
* | | | | Updates order of parameters in save docstring to match function parameter orderJames Bourbeau2017-08-301-2/+2
| | | | |
* | | | | Merge pull request #9601 from MSeifert04/doc_rot90_added_directiveCharles Harris2017-08-241-2/+2
|\ \ \ \ \ | | | | | | | | | | | | DOC: rot90 wrongly positioned versionadded directive.
| * | | | | DOC: rot90 wrongly positioned versionadded directive. [skip ci]Michael Seifert2017-08-251-2/+2
| | | | | |
* | | | | | BUG: fix infinite loop when creating np.pad on an empty arrayIryna Shcherbina2017-08-242-0/+7
|/ / / / /
* | | | | Merge pull request #9524 from charris/add_init_to_test_directoriesCharles Harris2017-08-121-0/+0
|\ \ \ \ \ | | | | | | | | | | | | TST, MAINT: Add `__init__.py` files to tests directories.
| * | | | | TST, MAINT: Add `__init__.py` files to tests directories.Charles Harris2017-08-061-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows pytest to run with duplicate test file names. Note that `python <path-to-test-file>` no longer works with this change, nor will a simple `pytest numpy`, because numpy is imported from the numpy repository. However, `python runtests.py` and `>>> numpy.test()` are still available.
* | | | | | MAINT: Use moveaxis instead of rollaxis internally (#9475)Nico Schlömer2017-08-104-11/+11
|/ / / / / | | | | | | | | | | | | | | | | | | | | Also add a hint to the documentation advising the use of moveaxis over rollaxis. Tests for rollaxis are left alone.
* | | | | Merge pull request #9522 from eric-wieser/stop-using-obj2sctypeCharles Harris2017-08-062-3/+8
|\ \ \ \ \ | | | | | | | | | | | | BUG: Fix problems with obj2sctype
| * | | | | BUG: Don't allow an array to be passed as the dtype argumentEric Wieser2017-08-062-3/+8
| | | | | |
* | | | | | Merge pull request #9505 from eric-wieser/fix-issubdtypeCharles Harris2017-08-064-7/+7
|\ \ \ \ \ \ | |/ / / / / |/| | | | | BUG: issubdtype is inconsistent on types and dtypes
| * | | | | MAINT: Stop using the undocumented coercion-then-downcast feature of subdtypeEric Wieser2017-08-054-7/+7
| | | | | |
* | | | | | MAINT: Remove `level=` keyword from test arguments.Charles Harris2017-08-052-19/+17
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | I don't know what that argument was used for, but it showis up in old tests and is not explicitly used within the tests. I assume it was part of an old testing framework and is now longer needed.
* | | | | MAINT/DOC: Use builtin when np.{x} is builtins.{x}.Eric Wieser2017-08-0510-57/+57
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the case for x in {int, bool, str, float, complex, object}. Using the np.{x} version is deceptive as it suggests that there is a difference. This change doesn't affect any external behaviour. The `long` type is missing in python 3, so np.long is still useful
* | | | | MAINT: Changed diff to use iterative instead of recursive approachJoseph Fox-Rabinovitz2017-07-312-23/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TST: Added tests for `n` parameter Added test for `datetime64` type change Added tests for axis normalization Added test for subtype handling DOC: Minor updates to docs: Added explanation for `n==0` Added documentation describing `datetime64` handling Updated formatting Added call to normalize_axis_index
* | | | | MAINT: Make `setxor1d' a bit clearer and speed it upwufangjie2017-07-281-5/+1
| | | | |
* | | | | make `setxor1d' a bit clear and speed upwufangjie2017-07-271-2/+3
| | | | | | | | | | | | | | | We need to find the index which is not the same with the left and right, I think np.logical_and's meaning is more clear and I test this got a speed up
* | | | | Merge pull request #9434 from charris/remove-unittest-dependenciesCharles Harris2017-07-2417-328/+327
|\ \ \ \ \ | | | | | | | | | | | | Remove unittest dependencies
| * | | | | TST: Remove unittest dependencies in numpy/lib/tests.Charles Harris2017-07-2417-328/+327
| | | | | |
* | | | | | MAINT: Use dtypes, not typecodes, and remove special casing for timedeltaEric Wieser2017-07-131-27/+21
| | | | | |
* | | | | | BUG: float16 is promoted to float64 by gradientEric Wieser2017-07-132-1/+7
|/ / / / / | | | | | | | | | | | | | | | This isn't the case for `diff`
* | | | | Merge pull request #9362 from charris/rearrange-testing-moduleCharles Harris2017-07-063-5/+3
|\ \ \ \ \ | | | | | | | | | | | | ENH: Rearrange testing module to isolate nose dependency.
| * | | | | MAINT: Rearrange files in numpy/testing module.Charles Harris2017-07-043-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The aim here is to separate out the nose dependent files prior to adding pytest support. This could be done by adding new files to the general numpy/testing directory, but I felt that it was to have the relevant files separated out as it makes it easier to completely remove nose dependencies when needed. Many places were accessing submodules in numpy/testing directly, and in some cases incorrectly. That presented a backwards compatibility problem. The solution adapted here is to have "dummy" files whose contents will depend on whether of not pytest is active. That way the module looks the same as before from the outside. In the case of numpy itself, direct accesses have been fixed. Having proper `__all__` lists in the submodules helped in that.
* | | | | | DOC: Add examples for complex dtypesEric Wieser2017-07-031-13/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also remove redundancy between the function and return value descriptions [ci skip]
* | | | | | Merge pull request #9343 from eric-wieser/recfunction-join-dtypeAllan Haldane2017-07-012-65/+189
|\ \ \ \ \ \ | | | | | | | | | | | | | | BUG: recfunctions fail in a bunch of ways due to using .descr
| * | | | | | MAINT: Avoid one more use of descrEric Wieser2017-07-011-11/+6
| | | | | | |
| * | | | | | MAINT: remove tuple<->list conversion danceEric Wieser2017-07-011-30/+31
| | | | | | |
| * | | | | | TST: join_by now works for dtypes with padding tooEric Wieser2017-07-011-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Once again, thanks to not using .descr
| * | | | | | MAINT: Shortcut for flat dtypes wasn't used for scalar dtypesEric Wieser2017-07-011-3/+3
| | | | | | |
| * | | | | | BUG: flatten_descr returns string not dtype for scalar dtypeEric Wieser2017-07-011-1/+1
| | | | | | |
| * | | | | | MAINT: Stop using .descr in recfunctionsEric Wieser2017-07-011-18/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This change shouldn't affect behaviour - all old uses were still correct.