summaryrefslogtreecommitdiff
path: root/numpy
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | | | Merge pull request #13947 from johannfaouzi/fix_rst_rendering_dtypeMatti Picus2019-07-091-2/+2
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | DOC: Fix rst rendering in data types
| * | | | | | | Re-add double backlashJohann Faouzi2019-07-091-1/+1
| | | | | | | |
| * | | | | | | Update basics.pyJohann Faouzi2019-07-091-2/+2
| | | | | | | |
* | | | | | | | Merge pull request #13950 from IntelPython/fix-fcompiler-compaqMatti Picus2019-07-091-1/+1
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Fixing failure on Python 2.7 on Windows 7
| * | | | | | | | Fixing failure on Python 2.7 on Windows 7Oleksandr Pavlyk2019-07-091-1/+1
| |/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When executing pytest --pyargs numpy.distuils.tests.test_fcompiler test_fcompiler_flags fails with ``` > raise e E ValueError: [u'path', u'include', u'lib'] lib\site-packages\numpy\distutils\fcompiler\compaq.py:100: ValueError ---------------------------- Captured stdout call ----------------------------- Unexpected ValueError in C:\TCAgent1\work\7cc6992266387eba\distribution\lib\site -packages\numpy\distutils\fcompiler\compaq.py ``` It appears that the list argument of ValueError contains 'path' not at the end of the list like the current test expects, but at the beginning. After this fix, 9 test failures of `pytest --pyargs numpy.distutils` go away.
* | | | | | | | DOC:Update the description of set_printoptions in quickstart doc #13900 (#13948)Samesh Lakhotia2019-07-091-0/+1
|/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Quickstart guide recommends np.set_printoptions(threshold=np.nan) but that fails. So changed that to np.set_printoptions(threshold=sys.maxsize) Closes #13900 * DOC:Update the docstring of set_printoptions Add preferred max value for threshold is sys.maxsize * Revert "DOC:Update the docstring of set_printoptions" This reverts commit 9641121fcb84b9ad5edb188a4a5b4ac9361fbf0b. * DOC:Update the docstring of set_printoptions Add preferred max value for threshold is sys.maxsize * DOC:Update the docstring of set_printoptions Better pharasing in docstring. * DOC:Update the description of set_printoptions in quickstart doc #13900 Fix indentation
* | | | | | | Merge pull request #13944 from eric-wieser/forbid-_add_newdocs-pythonEric Wieser2019-07-083-216/+64
|\ \ \ \ \ \ \ | |/ / / / / / | | | | | | | MAINT,BUG,DOC: Fix errors in _add_newdocs
| * | | | | | BUG: Don't silence errors in add_newdoc caused by bad argumentsEric Wieser2019-06-301-12/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This caught us trying to document members that don't exist.
| * | | | | | DOC: Remove docstrings which are duplicated from `numpy/core/multiarray.py`Eric Wieser2019-06-301-156/+0
| | | | | | |
| * | | | | | DOC: Remove documentation for property that does not existEric Wieser2019-06-301-7/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | `ndarray._as_parameter_` is not a real thing
| * | | | | | BUG: Add missing `np.core.multiarray._get_ndarray_c_version` functionEric Wieser2019-06-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This must have been lost in the multiarray / umath merge. Found by noticing that `add_newdocs` was being called on an object that does not exist.
| * | | | | | BUG: Remove items from `multiarray.__all__` which do not exist on python 3Eric Wieser2019-06-302-40/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Avoid using `_add_newdocs` if these functions do not exist. Leaving the version-checking here so that we can backport to 1.16
* | | | | | | Revert "MAINT/BUG/DOC: Fix errors in _add_newdocs (#13876)"revert-13876-forbid-_add_newdocs-pythonEric Wieser2019-07-083-64/+216
| |_|/ / / / |/| | | | | | | | | | | | | | | | | This reverts commit 7ac7fa9a4621f7392f534b20f0cdd64967e9c7eb.
* | | | | | Merge pull request #13925 from MSeifert04/fix-typo-unfuncCharles Harris2019-07-081-2/+2
|\ \ \ \ \ \ | | | | | | | | | | | | | | MAINT: Fix wrong spelling of ufunc
| * | | | | | DOC: Fix wrong spelling of ufuncMSeifert042019-07-061-2/+2
| | | | | | |
* | | | | | | Merge pull request #13847 from kritisingh1/depMatti Picus2019-07-071-0/+1
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | DOC: Adds documentation of functions exposed in numpy namespace
| * | | | | | | Removes duplicated docs for python functionskritisingh12019-07-061-240/+0
| | | | | | | |
| * | | | | | | DOC: Adds documentation of functions exposed in numpy namespacekritisingh12019-06-271-0/+160
| | | | | | | |
* | | | | | | | Merge pull request #13926 from MSeifert04/replace-next-method-callsMatti Picus2019-07-073-10/+8
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | DOC: Remove explicit .next method calls with built-in next function calls
| * | | | | | | | DOC: Remove explicit .next method calls with built-in nextMSeifert042019-07-073-10/+8
| | |_|_|/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In some cases the documentation examples failed with an AttributeError because the next method was not there. In a few other cases it still worked but may be more future-proof and ideomatic if they used the next function instead of the next method.
* | | | | | | | Merge pull request #13907 from stestagg/masterMatti Picus2019-07-073-2/+43
|\ \ \ \ \ \ \ \ | |/ / / / / / / |/| | | | | | | BUG: handle weird bytestrings in dtype() (#13902)
| * | | | | | | STY: standardize creation of bytestrings in dtype testsSteve Stagg2019-07-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the b'' constructor rather than bytes([])
| * | | | | | | STY: Cast away signdness on value rather than pointerSteve Stagg2019-07-041-1/+1
| | | | | | | |
| * | | | | | | BUG: handle weird bytestrings in dtype() (#13902)Steve Stagg2019-07-033-2/+43
| | |_|_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Explicit check for negative type value in PyArray_DescrFromType * PyArray_DescrConverter casts to unsigned char to match python bytes * Add some tests
* | | | | | | Merge pull request #13922 from MSeifert04/remove-parens-numpy-maMatti Picus2019-07-061-13/+13
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | MAINT: Remove unnecessary parenthesis in numpy.ma.core
| * | | | | | | MAINT: Remove unnecessary parenthesis in numpy.ma.coreMSeifert042019-07-061-13/+13
| |/ / / / / /
* | | | | | | MAINT/BUG/DOC: Fix errors in _add_newdocs (#13876)Eric Wieser2019-07-063-216/+64
| |_|/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * BUG: Remove items from `multiarray.__all__` which do not exist on python 3 Avoid using `_add_newdocs` if these functions do not exist. Leaving the version-checking here so that we can backport to 1.16 * BUG: Add missing `np.core.multiarray._get_ndarray_c_version` function This must have been lost in the multiarray / umath merge. Found by noticing that `add_newdocs` was being called on an object that does not exist. * DOC: Remove documentation for property that does not exist `ndarray._as_parameter_` is not a real thing * DOC: Remove docstrings which are duplicated from `numpy/core/multiarray.py` * BUG: Don't silence errors in add_newdoc caused by bad arguments This caught us trying to document members that don't exist.
* | | | | | BUG: i0 Bessel function regression on array-likes supporting ufuncsSebastian Berg2019-07-042-0/+17
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For array likes supporting UFuncs, `np.abs` would return an array-like, and this is currently not compatible with the use of `np.piecewise`. The simplest fix seems to be to just call asanyarray (which piecewise calls anyway on the array) beforehand. This way we ensure the conditions are also an array. Fixes gh-13894
* | | | | BUG: Refcount fixes (#13860)Sebastian Berg2019-07-0320-44/+104
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * BUG: Fix leaking of object descriptor on dtype discovery of `None` * BUG: Fix reference count leak in string discovery code path * BUG: Fix two more datetime related reference count bugs One is leaking only the python integer 1, the other a descriptor. * BUG: Fix bugs in vectorized string functions error paths Fixes reference count issues (a leak) in TestVecString::test_non_existent_method and TestVecString::test_non_string_array * BUG: Fix Reference count leak in in128 C-level tests * BUG: Fix refcount leak in advanced indexing error path * BUG,MAINT: Refactor indexing dtypes handling in mapiter constructor Using borrowed references for the dtypes seems much easier to get the reference counts right. * BUG: Reference leaks in deprecated datetime with timezone coercion * BUG: Refcount issue in nonzero 0-d path * BUG: Fix ufunc.at dtype refcount handling in resolver * BUG: Fix reference count in nditer python op_axes setup * BUG: Reference leak in writebackifcopy non-array error path * BUG: Add missing DECREF in ufunc with dtype type resolution * BUG: Reference count bugs in io functions * BUG: Reference count loss in as_c_array C-side tests * BUG: Leaking of method in object method based ufunc loops The function could possibly be optimized nicely by checking that the method will be the same because the types are identical. OTOH, that may not be correct in dynamically adapted types. * TST: Clean up cyclic ctypes reference to simplify leak debugging If we do not clean it up in this test, the collection can take so long that it affects the following tests when running with reference leak debugging tools (pytest-leaks). * BUG: Reference count of raw data for 0-sized unpickling * TST: Mark tests which must leak references It really may be time to remove this, considering how annoying this is, may want to think about getting rid of that behaviour. Could probably write a multiearraytests C-side function instead. * BUG: Fix refcount leaks in arr.getield and setfield error paths * BUG: Fix refcount issue in wheremask This fix is not the prettiest, since it relies on the wheremask to be formatted to boolean beforehand correctly. * TST: Reset StringConvert after mutating it in tests Or maybe just mark the test? * BUG: Fix missing static for npy_cache_import in umath funcs.inc.src * BUG: Fix refcount in multiternew error path * BUG: Fix npy_ObjectGCD and LCM reference counting * BUG: Decrement already wrapped outputs on failure This is not super pretty, but not sure how to do it much better right now. * FIXUP: iotools StringConverter._mapper * FIXUP: as_c_array tests * FIXUP: String/dtype discovery comment * FIXUP: Nonzero comment * FIXUP: mapiternew -- check error return of dtype creation In principle, at least at this time, this is not possible
* | | | | Merge pull request #13003 from seberg/dtype-attr-recursionMatti Picus2019-07-034-26/+103
|\ \ \ \ \ | | | | | | | | | | | | BUG: Do not crash on recursive `.dtype` attribute lookup.
| * | | | | BUG: Do not crash on recursive `.dtype` attribute lookup.Sebastian Berg2019-05-254-26/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code path in scalarapi.c which checks dtype on one inheriting from np.void is especially awkward and was completely untested previously. So I am not sure we should even support it at all. Closes gh-12982, gh-3614, and gh-12751
* | | | | | MAINT: Delete unused _aliased_types.pySeth Troisi2019-07-021-0/+0
| |_|_|_|/ |/| | | |
* | | | | DOC: Fix typo in "make_mask" documentationMSeifert042019-07-021-1/+1
| | | | |
* | | | | Merge pull request #13882 from MSeifert04/more-unnecessary-backslashesCharles Harris2019-07-025-22/+22
|\ \ \ \ \ | | | | | | | | | | | | MAINT: Remove unnecessary backslashes (and replace others by using parenthesis)
| * | | | | MAINT: Remove unnecessary backslashes when not needed.MSeifert042019-07-025-22/+22
| | | | | | | | | | | | | | | | | | | | | | | | See also: #13880
* | | | | | Merge pull request #13883 from MSeifert04/replace-integers-with-booleansCharles Harris2019-07-0221-71/+71
|\ \ \ \ \ \ | | | | | | | | | | | | | | MAINT: Replace integers in places where booleans are expected
| * | | | | | MAINT: Replace integers in places where booleans are expectedMSeifert042019-07-0121-71/+71
| |/ / / / /
* | | | | | DOC: Add missing parameter description for keepdims in MaskedArrayMSeifert042019-07-011-0/+12
|/ / / / / | | | | | | | | | | | | | | | | | | | | The methods max, min, ptp were missing the parameter in the documentation.
* | | | | MAINT: Remove an unnessary backslash between two string literalsMSeifert042019-07-011-1/+1
| | | | |
* | | | | Merge pull request #13870 from seberg/no-empty-allocCharles Harris2019-06-301-5/+3
|\ \ \ \ \ | | | | | | | | | | | | MAINT,BUG: Use nbytes to also catch empty descr during allocation
| * | | | | MAINT,BUG: Use nbytes to also catch empty descr during allocationSebastian Berg2019-06-291-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We do not want to allocate 0 bytes (since it is not well defined), normally nbytes is 0 if the array is empty. But in case also the descriptor element size is empty, use 1 byte.
* | | | | | ENH: Rename tests for default_rngRobert Kern2019-06-292-2/+2
| | | | | |
* | | | | | ENH: Rename default_gen to default_rngRobert Kern2019-06-294-61/+61
|/ / / / /
* | | | | Merge pull request #13863 from rkern/doc/pcg-variantCharles Harris2019-06-292-8/+13
|\ \ \ \ \ | | | | | | | | | | | | DOC: Document the precise PCG variant.
| * | | | | DOC: Document the precise PCG variant.Robert Kern2019-06-282-8/+13
| | | | | | | | | | | | | | | | | | | | | | | | Also, turn some of the reference URLs into links.
* | | | | | TST: Use exc.value.args[0] to avoid change in pytest printingSebastian Berg2019-06-281-1/+1
| | | | | |
* | | | | | TST: Ignore DeprecationWarning during nose importsSebastian Berg2019-06-281-1/+3
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | Nose is outdated and causes a DeprecationWarning during import, a change in pytest seems to now trip over the warning, so ignore it (in a slightly ugly manner)
* | | | | ENH: Deprecate writeable broadcast_array (#12609)Matti Picus2019-06-288-32/+179
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the base is not an array (or generally when the flag of the base array was toggled), it is OK to allow setting the writeable flag to True, as long as any ancestor (especially the last one) is writeable. This commit also slightly change the behaviour of the base attribute. --- * ENH: Deprecate writeable broadcast_array * ENH: Make writeable flag enabling more reliable for non-array bases When the base is not an array (or generally when the flag of the base array was toggled), it is OK to allow setting the writeable flag to True, as long as any ancestor (especially the last one) is writeable. * Update doc/release/1.17.0-notes.rst Co-Authored-By: Sebastian Berg <sebastian@sipsolutions.net> * Update doc/release/1.17.0-notes.rst Co-Authored-By: Sebastian Berg <sebastian@sipsolutions.net> * Update numpy/lib/tests/test_stride_tricks.py Co-Authored-By: Sebastian Berg <sebastian@sipsolutions.net> * Update numpy/core/tests/test_multiarray.py Co-Authored-By: Sebastian Berg <sebastian@sipsolutions.net> * DOC: improve warning (from review)
* | | | | BUG: Ensure consistent interpretation of uint64 states. (#13861)Robert Kern2019-06-284-4/+25
| | | | | | | | | | | | | | | * BUG: test, fix for big-endian systems
* | | | | Merge pull request #13855 from seberg/dtype-from-dictMatti Picus2019-06-283-0/+19
|\ \ \ \ \ | | | | | | | | | | | | BUG: Fix memory leaks in dtype constructor code