summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | DOC: Update description of sep in fromstringKexuan Sun2019-06-181-3/+8
| | | | |
* | | | | Merge pull request #13781 from Nodd/patch-1Charles Harris2019-06-211-8/+6
|\ \ \ \ \ | | | | | | | | | | | | DOC: Update TESTS.rst.txt for pytest
| * | | | | Update imports and systematic skip/failJoseph Martinot-Lagarde2019-06-171-4/+3
| | | | | |
| * | | | | DOC: Update TESTS.rst.txt for pytestJoseph Martinot-Lagarde2019-06-141-6/+5
| | | | | | | | | | | | | | | | | | Fully closes #13751.
* | | | | | Merge pull request #13815 from bashtage/pcg64-intrinMatti Picus2019-06-211-0/+4
|\ \ \ \ \ \ | |_|_|/ / / |/| | | | | MAINT: Correct intrinsic use on Windows
| * | | | | MAINT: Correct intrinsic use on WindowsKevin Sheppard2019-06-211-0/+4
|/ / / / / | | | | | | | | | | | | | | | Add pragme and include for Windows PCG64
* | | | | Merge pull request #13791 from mattip/remove-dSFMTCharles Harris2019-06-2030-4745/+11
|\ \ \ \ \ | | | | | | | | | | | | MAINT: remove dSFMT
| * | | | | MAINT: remove dSFMTmattip2019-06-1630-4745/+11
| | | | | |
* | | | | | Merge pull request #13767 from kritisingh1/attributesMatti Picus2019-06-182-1/+119
|\ \ \ \ \ \ | | | | | | | | | | | | | | DOC: Adds examples for dtype attributes
| * | | | | | DOC: Adds examples for dtype attributeskritisingh12019-06-172-1/+119
| | | | | | |
* | | | | | | Merge pull request #13786 from WarrenWeckesser/random-warningsMatti Picus2019-06-183-6/+8
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | MAINT: random: Fix a few compiler warnings.
| * | | | | | | MAINT: random: Fix a few compiler warnings.Warren Weckesser2019-06-143-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes: gcc: numpy/random/src/xoshiro256/xoshiro256.c numpy/random/src/xoshiro256/xoshiro256.c:39:16: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare] for (i = 0; i < sizeof JUMP / sizeof *JUMP; i++) ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~ gcc: numpy/random/src/xoshiro512/xoshiro512.c numpy/random/src/xoshiro512/xoshiro512.c:43:17: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare] for (i = 0; i < sizeof JUMP / sizeof *JUMP; i++) ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~ numpy/random/src/xoshiro512/xoshiro512.c:46:23: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare] for (w = 0; w < sizeof s_placeholder / sizeof *s_placeholder; w++) ~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ gcc: numpy/random/src/distributions/distributions.c numpy/random/src/distributions/distributions.c:185:14: warning: comparison of integers of different signs: 'int64_t' (aka 'long long') and 'const uint64_t' (aka 'const unsigned long long') [-Wsign-compare] if (rabs < ki_double[idx]) ~~~~ ^ ~~~~~~~~~~~~~~ numpy/random/src/distributions/distributions.c:230:14: warning: comparison of integers of different signs: 'int32_t' (aka 'int') and 'const uint32_t' (aka 'const unsigned int') [-Wsign-compare] if (rabs < ki_float[idx]) ~~~~ ^ ~~~~~~~~~~~~~
* | | | | | | | [WIP] DOC : Refactor C-API -- Python Types and C structures (#13746)Kriti Singh2019-06-171-40/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * [DOC] Refactor C-API: Python Types and C structures
* | | | | | | | Merge pull request #13792 from rgommers/dragon4-licenseMatti Picus2019-06-163-37/+41
|\ \ \ \ \ \ \ \ | |_|_|/ / / / / |/| | | | | | | LICENSE: update dragon4 license to MIT
| * | | | | | | LICENSE: update dragon4 license to MIT.Ralf Gommers2019-06-163-37/+41
|/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ralf Gommers obtained written permission from Ryan Juckett on 15 June 2019 to distribute the dragon4-derived code under the MIT license. Note that the "one of a kind" designation in LICENSES_bundled.txt wasn't quite correct: this was the Zlib license (which is less well known, but also compatible with NumPy's BSD 3-clause license). Closes gh-13674
* | | | | | | Merge pull request #13777 from seberg/min-scalar-typeCharles Harris2019-06-153-108/+60
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | MAINT: Remove duplication of should_use_min_scalar_type function
| * | | | | | | MAINT: Remove duplication of should_use_min_scalar_type functionSebastian Berg2019-06-133-108/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The function was used within umath but since the modules are joined now, there is no need for the duplication.
* | | | | | | | Merge pull request #13789 from WarrenWeckesser/radixsort-warningsMatti Picus2019-06-151-4/+6
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | MAINT: Fix warnings in radixsort.c.src: comparing integers of different signs
| * | | | | | | | MAINT: Fix warnings in radixsort.c.src: comparing integers of different signsWarren Weckesser2019-06-151-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Eliminate many compiler warnings of the form: numpy/core/src/npysort/radixsort.c.src:61:23: warning: comparison of integers of different signs: 'npy_intp' (aka 'long') and 'unsigned long' [-Wsign-compare] for (l = 0; l < sizeof(npy_ubyte); l++) { ~ ^ ~~~~~~~~~~~~~~~~~ numpy/core/src/npysort/radixsort.c.src:66:19: warning: comparison of integers of different signs: 'npy_intp' (aka 'long') and 'unsigned long' [-Wsign-compare] for (l = 0; l < sizeof(npy_ubyte); l++) { ~ ^ ~~~~~~~~~~~~~~~~~
* | | | | | | | | Merge pull request #13761 from WarrenWeckesser/random-hypergeometricMatti Picus2019-06-1510-124/+592
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | MAINT: random: Rewrite the hypergeometric distribution.
| * | | | | | | | | MAINT: random: Rewrite the hypergeometric distribution.Warren Weckesser2019-06-1410-124/+592
| | |_|/ / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary of the changes: * Move the functions random_hypergeometric_hyp, random_hypergeometric_hrua and random_hypergeometric from distributions.c to legacy-distributions.c. These are now the legacy implementation of hypergeometric. * Add the files logfactorial.c and logfactorial.h, containing the function logfactorial(int64_t k). * Add the files random_hypergeometric.c and random_hypergeometric.h, containing the function random_hypergeometric (the new implementation of the hypergeometric distribution). See more details below. * Fix two tests in numpy/random/tests/test_generator_mt19937.py that used values returned by the hypergeometric distribution. The new implementation changes the stream, so those tests needed to be updated. * Remove another test obviated by an added constraint on the arguments of hypergeometric. Details of the rewrite: If you carefully step through the old function rk_hypergeometric_hyp(), you'll see that the end result is basically the same as the new function hypergeometric_sample(), but the new function accomplishes the result with just integers. The floating point calculations in the old code caused problems when the arguments were extremely large (explained in more detail in the unmerged pull request https://github.com/numpy/numpy/pull/9834). The new version of hypergeometric_hrua() is a new translation of Stadlober's ratio-of-uniforms algorithm for the hypergeometric distribution. It fixes a mistake in the old implementation that made the method less efficient than it could be (see the details in the unmerged pull request https://github.com/numpy/numpy/pull/11138), and uses a faster function for computing log(k!). The HRUA algorithm suffers from loss of floating point precision when the arguments are *extremely* large (see the comments in github issue 11443). To avoid these problems, the arguments `ngood` and `nbad` of hypergeometric must be less than 10**9. This constraint obviates an existing regression test that was run on systems with 64 bit long integers, so that test was removed.
* | | | | | | | | DOC: Change random to uninitialized and unpredictable in empty and ↵Kexuan Sun2019-06-153-5/+6
| |/ / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | empty_like (#13771) * DOC: Change "random" to "uninitialized" in doctests
* | | | | | | | Merge pull request #13788 from tacaswell/mnt_glob_bugRalf Gommers2019-06-151-1/+1
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | MAINT: fix 'in' -> 'is' typo
| * | | | | | | | MAINT: fix 'in' -> 'is' typoThomas A Caswell2019-06-141-1/+1
| | |_|_|/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is generating a SyntaxWarning. It looks like it has been like this from 2006 (8869df5b1cba1ffeda6d772eee1a7507fe18bdef) when this first came into the code base.
* | | | | | | | Merge pull request #13787 from HerculesJack/docversionaddedRalf Gommers2019-06-154-5/+7
|\ \ \ \ \ \ \ \ | |_|/ / / / / / |/| | | | | | | DOC: Fixed the problem of "versionadded"
| * | | | | | | Update nanfunctions.pyHe Jia2019-06-141-0/+1
| | | | | | | |
| * | | | | | | Update ufunc_docstrings.pyHe Jia2019-06-141-2/+2
| | | | | | | |
| * | | | | | | Update linalg.pyHe Jia2019-06-141-1/+1
| | | | | | | |
| * | | | | | | Update linalg.pyHe Jia2019-06-141-1/+1
| | | | | | | |
| * | | | | | | Update function_base.pyHe Jia2019-06-141-1/+2
|/ / / / / / /
* | | | | | | Merge pull request #11859 from kirienko/bug-fix-5645-dtypesCharles Harris2019-06-142-1/+17
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | BUG: test and fix np.dtype('i,L') #5645
| * | | | | | | BUG: test and fix np.dtype('i,L')kirienko2019-04-292-1/+17
| | | | | | | |
* | | | | | | | Merge pull request #13757 from shoyer/hist-dispatcherMarten van Kerkwijk2019-06-142-2/+22
|\ \ \ \ \ \ \ \ | |_|/ / / / / / |/| | | | | | | MAINT: fix histogram*d dispatchers
| * | | | | | | MAINT: check bins length in histogram2d_dispatcherStephan Hoyer2019-06-111-4/+11
| | | | | | | |
| * | | | | | | MAINT: spellingStephan Hoyer2019-06-111-1/+1
| | | | | | | |
| * | | | | | | MAINT: fix histogram*d dispatchersStephan Hoyer2019-06-112-2/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fixes GH-13728
* | | | | | | | BUG: Make ``Generator._masked`` flag default to ``False``. (#13774)Bernardt Duvenhage2019-06-132-28/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Flipped the _masked flag to correctly use Lemire's method as suggested in the comment. See related issue https://github.com/numpy/numpy/issues/13769. * Updated a selection of the unit tests for Lemire's method as opposed to masked rejection sampling. * Removed comments and prints used during testing.
* | | | | | | | Merge pull request #13773 from ↵Matti Picus2019-06-131-1/+2
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | bduvenhage/doc_update/reference_update_for_lemires_method DOC: Update of reference to paper for Lemire's method
| * | | | | | | | Reduced line length.bduvenhage2019-06-131-1/+2
| | | | | | | | |
| * | | | | | | | DOC: Update of reference to paper for Lemire's method. Replaced with 2019 ↵bduvenhage2019-06-131-1/+1
| | |_|_|_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | journal reference as per Lemire's website; same arxiv link.
* | | | | | | | Merge pull request #13725 from mshabunin/fix-limited-api-buildMatti Picus2019-06-131-2/+2
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | BUG: fix compilation of 3rdparty modules with Py_LIMITED_API enabled
| * | | | | | | | BUG: fix compilation of 3rdparty modules with Py_LIMITED_API enabledMaksim Shabunin2019-06-131-2/+2
| | |_|_|_|/ / / | |/| | | | | | | | | | | | | | | | | | | | | | There are no macros PyTuple_GET_SIZE and PyTuple_GET_ITEM available when compiling with enabled Py_LIMITED_API.
* | | | | | | | Merge pull request #13708 from eric-wieser/deprecate-nonzeroMatti Picus2019-06-135-14/+59
|\ \ \ \ \ \ \ \ | |_|/ / / / / / |/| | | | | | | DEP: Deprecate nonzero(0d) in favor of calling atleast_1d explicitly
| * | | | | | | DOC: emphasize that nonzero is a bad idea on 0d arraysEric Wieser2019-06-081-11/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also indicate that the current behavior in this case is deprecated. This also removes the advice to use `a[nonzero(a)]` or `transpose(nonzero(a))`, for which there are better spellings.
| * | | | | | | DEP: Deprecate nonzero(0d) in favor of calling atleast_1d explicitlyEric Wieser2019-06-044-3/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a weird enough corner case that either: * No one is running into it, and downstream code is broken on 0d arrays anyway * People already have hacks in place to work around it: * Calling `nonzero` but handling the result specially if the array was 0d. We want to dissuade this in case we change the result of nonzero to be better in future. * Not calling `nonzero` at all if the array is zerod (such as by using `atleast1d`). These users are unaffected.
* | | | | | | | Merge pull request #13770 from WarrenWeckesser/ziggurat-constantsEric Wieser2019-06-123-277/+10
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | MAINT: random: Combine ziggurat.h and ziggurat_constants.h
| * | | | | | | | MAINT: random: Combine ziggurat.h and ziggurat_constants.hWarren Weckesser2019-06-123-277/+10
|/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | ... and remove the unused arrays that were in ziggurat.h.
* | | | | | | | Merge pull request #13648 from ↵Marten van Kerkwijk2019-06-127-23/+137
|\ \ \ \ \ \ \ \ | |_|_|_|_|_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | mhvk/disallow-can-cast-of-everything-to-structured BUG: ensure that casting to/from structured is properly checked.
| * | | | | | | BUG: ensure that casting to/from structured is properly checked.Marten van Kerkwijk2019-06-127-23/+137
|/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow unsafe casting from a simple data type to a structured one with multiple fields, but only from structured data type with a single field (checked recursively) to a simple data type. For now, continue to allow any structured to structured with casting="unsafe", as the current can_cast implementation does not match that of "astype".
* | | | | | | DOC: update test guidelines document to use pytest for skipif (#13760)Chuanzhu Xu2019-06-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * update document to use pytest for skipif * Fix skipif parameter reason