summaryrefslogtreecommitdiff
path: root/numpy/lib
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #14583 from mattip/select-deprecationSebastian Berg2019-09-262-38/+10
|\ | | | | DEP: remove deprecated select behaviour
| * DEP: remove expired deprecation in selectmattip2019-09-232-38/+10
| |
* | Merge pull request #14573 from rgommers/remove-info-filesMatti Picus2019-09-252-161/+13
|\ \ | | | | | | DOC: update submodule docstrings, remove info.py files
| * | DOC: clean up numpy.lib docstring, remove numpy/lib/info.pyRalf Gommers2019-09-222-161/+13
| |/
* | BUG: Add missing check for 0-sized array in ravel_multi_indexSebastian Berg2019-09-221-0/+18
|/ | | | | In wrap and clip modes ravel_multi_index crashes or gave invalid results if input arrays were empty but the shape not.
* TST: make xfailed test for modules in public API pass.Ralf Gommers2019-09-191-0/+3
|
* MAINT: add missing 'Arrayterator' to `numpy.lib.__all__`Ralf Gommers2019-09-191-3/+7
| | | | | | | Also finish the TODO about figuring out which np.lib.<submodule>'s are public. This is a giant mess ...
* MAINT: fix issue with `np.lib.mixins.__all__` and import of mixinsRalf Gommers2019-09-192-5/+3
|
* DOC: Added missing versionadded to diff(prepend)Joseph R. Fox-Rabinovitz2019-09-181-2/+4
|
* Merge pull request #14520 from felixdivo/patch-1Matti Picus2019-09-161-4/+3
|\ | | | | Mention that split() returns views into the original array
| * Mention that split() returns views into the original arrayFelix Divo2019-09-161-4/+3
| | | | | | Also adds a minor code change
* | Merge pull request #14521 from alexhenrie/lookforMatti Picus2019-09-161-6/+1
|\ \ | | | | | | MAINT: Simplify lookfor function
| * | MAINT: Simplify lookfor functionAlex Henrie2019-09-151-6/+1
| |/
* | Merge pull request #14511 from eric-wieser/fix-flatten_dtypeMatti Picus2019-09-162-5/+5
|\ \ | |/ |/| BUG: Fix flatten_dtype so that nested 0-field structs are flattened correctly
| * BUG: Fix flatten_dtype so that nested 0-field structs are flattened correctlyEric Wieser2019-09-142-5/+5
| | | | | | | | This affects the behavior of merge_arrays.
* | Merge pull request #14510 from eric-wieser/fix-drop_fieldsMatti Picus2019-09-152-4/+8
|\ \ | | | | | | API: Do not return None from recfunctions.drop_fields
| * | API: Do not return None from recfunctions.drop_fieldsEric Wieser2019-09-142-4/+8
| |/ | | | | | | This return value was not documented and did not make any sense. There's no reason to have a special case here.
* | Merge pull request #14508 from Kai-Striega/financial_reviewSebastian Berg2019-09-142-6/+33
|\ \ | |/ |/| DOC: Add warning to NPV function
| * TST: Move NPV-IRR congruence check to testskai-striega2019-09-142-7/+6
| | | | | | | | | | | | | | | | | | | | | | The internal rate of return (irr) is defined as the rate of return required for the net present values of a series of cashflows to be zero. i.e the lowest rate of return required for a project to break even. This is currently checked by refering to the example output from the ``irr`` and ``npv`` function documentation. This commit adds a test to confirm the identity holds.
| * DOC: Add warning message to np.npv docskai-striega2019-09-141-0/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ``np.npv`` calculates the present value of a series of cashflows starting in the present (t=0). Another common definition of NPV uses the future cashflows i.e. starting at the end of the first period. The difference in definition can lead to confusion for users moving between NumPy and other projects [1] and adds complexity for maintainers [2]. This commit adds a warning to the ``npv`` function's documentation and adds an example on how to find the npv of a project using the alternate definition. [1] https://github.com/numpy/numpy/issue/10877 [2] https://github.com/numpy/numpy/pull/3346
* | Merge pull request #14255 from hgt312/fix_uniqueSebastian Berg2019-09-122-4/+8
|\ \ | | | | | | BUG: fix inconsistent axes ordering for axis in function `unique`
| * | add description in docstringHuang, Guangtai2019-08-211-0/+1
| | |
| * | fix uniqueHuang, Guangtai2019-08-132-4/+7
| | |
* | | Merge pull request #14209 from lagru/fix-linear-rampCharles Harris2019-09-052-76/+41
|\ \ \ | | | | | | | | BUG: Fix uint-overflow if padding with linear_ramp and negative gain
| * | | BUG: Replace _linear_ramp with linspaceLars Grueter2019-08-272-76/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | linspace supports non-scalar values since version 1.16. This can replace the former _linear_ramp method. This removes a bug in the old implementation where certain edge and end values resulted in an integer underflow for unsigned dtypes (see gh-14191). Protect against this regression with a new test for all numeric dtypes.
* | | | Merge pull request #14365 from WarrenWeckesser/doc-averageMatti Picus2019-08-271-2/+5
|\ \ \ \ | | | | | | | | | | DOC: lib: Add more explanation of the weighted average calculation.
| * | | | DOC: lib: Add more explanation of the weighted average calculation.Warren Weckesser2019-08-261-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | Also removed the incorrect comment from the docstring of `numpy.ma.average` about the imaginary part of `weights` being ignored.
* | | | | Merge pull request #14370 from ivirshup/var-dtype-docfixMatti Picus2019-08-271-1/+1
|\ \ \ \ \ | |/ / / / |/| | | | DOC: Fixed dtype docs for var, nanvar.
| * | | | DOC: Fixed dtype docs for var, nanvar.Isaac Virshup2019-08-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Docs incorrectly stated that the default output dtype was float32 when input array is of an integer dtype. However: ```python np.var(np.random.randint(0, 100, 1000)).dtype == np.dtype("f8") ```
* | | | | DEP: Deprecate class `SafeEval` (#14335)Maxwell Aladago2019-08-241-87/+0
| | | | | | | | | | | | | | | | | | | | * Deprecate class SafeEval
* | | | | Merge pull request #14310 from ahaldane/fix_struct_to_unstruct_nestingCharles Harris2019-08-232-8/+75
|\ \ \ \ \ | | | | | | | | | | | | MAINT: Fix behavior of structured_to_unstructured on non-trivial dtypes
| * | | | | MAINT: fix behavior of structured_to_unstructured on non-trivial dtypesAllan Haldane2019-08-232-8/+75
| | |_|_|/ | |/| | | | | | | | | | | | | Fixes #13333
* | | | | Merge remote-tracking branch 'upstream/master' into fix-if-fieldsEric Wieser2019-08-1939-2514/+3074
|\ \ \ \ \ | |/ / / /
| * | | | DOC:Add example to clarify "numpy.save" behavior on already open file #10445 ↵Omar Merghany2019-08-161-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | (#14070) * DOC:Add example to clarify "numpy.save" behavior on already unclosed file
| * | | | Merge pull request #14101 from lagru/zero_stat_lengthSebastian Berg2019-08-152-1/+31
| |\ \ \ \ | | | | | | | | | | | | MAINT: Clearer error message while padding with stat_length=0
| | * | | | MAINT: Clearer error while padding stat_length=0Lars Grueter2019-08-092-1/+31
| | | |/ / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Provides a clearer error message if stat_length=0 is the cause of an exception (mean and median return nan with warnings) as well as tests covering this behavior. Note: This shouldn't change the behavior/API except for the content of the raised ValueError.
| * | | | fixes StopIteration error for empty file with skip_header > 0Maxwell Aladago2019-08-112-5/+10
| | |_|/ | |/| |
| * | | DOC: new nan_to_num keywords are from 1.17 onwards (#14219)Géraud Le Falher2019-08-081-1/+9
| |/ / | | | | | | * DOC: new nan_to_num keywords are from 1.17 onwards
| * | DOC: fix documentation of i and j for tri.hvy2019-07-241-1/+1
| | |
| * | Add blank line above doctest for intersect1dJackie Leng2019-07-231-0/+1
| | |
| * | Merge pull request #14063 from luispedro/fix_save_duck_checkCharles Harris2019-07-222-2/+40
| |\ \ | | | | | | | | BUG: Fix file-like object check when saving arrays
| | * | TST Test file-like object detection in save/loadLuis Pedro Coelho2019-07-201-0/+38
| | | |
| | * | BUG: Fix file-like object check when saving arraysLuis Pedro Coelho2019-07-201-2/+2
| | | | | | | | | | | | | | | | For writing arrays, only the ``write`` method is necessary.
| * | | Merge pull request #13964 from colinsnyder/add-recfunctionsCharles Harris2019-07-222-44/+44
| |\ \ \ | | |/ / | |/| | BUG, DOC: add new recfunctions to `__all__`
| | * | fixed unstructured_to_structured in recfunctionsColin Snyder2019-07-202-7/+13
| | | |
| | * | Removed unnecessary decorators and dispatcher functionsColin Snyder2019-07-151-15/+0
| | | |
| | * | exported correct functions and made private the restColin Snyder2019-07-142-30/+34
| | | |
| | * | add new recfunctions to __all__Colin Snyder2019-07-101-11/+16
| | | |
| * | | DEP: Speed up WarnOnWrite deprecation in buffer interfaceSebastian Berg2019-07-161-3/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a buffer interface does not request a writeable buffer, simply pass a read-only one when the warn on write flag is set. This is to give an easier way forward with avoiding the deprecation warnings: Simply do not ask for a writeable buffer. It will break code that expects writeable buffers but does not ask for them specifically a bit harder than would be nice. But since such code probably should ask for it specifically, this is likely fine (an RC release has to find out). The main reason for this is, that this way it plays very will with cython, which requests writeable buffers explicitly and if declared `const` is happy about read-only (so that using `const` is the best way to avoid the warning and makes code cleaner). Closes gh-13929, gh-13974
| * | | DOC: Change (old) range() to np.arange()Dieter Werthmüller2019-07-111-3/+3
| |/ / | | | | | | I think it should be like that (maybe I am mistaken).