summaryrefslogtreecommitdiff
path: root/numpy
Commit message (Collapse)AuthorAgeFilesLines
* BUG: load fails when using pickle without allow_pickle=Truepr/12889Paul Ivanov2019-04-165-16/+30
| | | | | | a partial mitigation of #12759. see also https://nvd.nist.gov/vuln/detail/CVE-2019-6446
* Merge pull request #13322 from eric-wieser/cyclic-importCharles Harris2019-04-134-447/+469
|\ | | | | MAINT: Move umath error helpers into their own module
| * MAINT: Move umath error helpers into their own moduleEric Wieser2019-04-134-447/+469
| | | | | | | | | | | | | | | | | | | | This is a direct move, with some tweaks to imports. For some reason, this changed the results of running the doctests, which now reflect the actual defaults for `geterrobj`. This helps to make `core.numeric` a little shorter. This doesn't affect the value of `np.core.numeric.__all__` which keeps code doing `from numpy.core.numeric import *` working.
* | Merge pull request #13324 from eric-wieser/move-asarrayCharles Harris2019-04-134-311/+328
|\ \ | |/ | | MAINT: Move asarray helpers into their own module
| * MAINT: Move asarray helpers into their own moduleEric Wieser2019-04-134-311/+328
| | | | | | | | | | | | | | | | This is a direct move, with some tweaks to imports. This breaks a cyclic imports between `core.numeric` and `core.fromnumeric`. This doesn't affect the value of `np.core.numeric.__all__` which keeps code doing `from numpy.core.numeric import *` working.
* | Merge pull request #13323 from seberg/ufunc-at-large-iterationEric Wieser2019-04-131-1/+1
|\ \ | |/ |/| BUG: ufunc.at iteration variable size fix
| * BUG: ufunc.at iteration variable size fixSebastian Berg2019-04-131-1/+1
| | | | | | | | | | | | | | | | | | The iteration variable has to be intp of course, unfortunately a test is too slow to be practical (even as a slow test). This code needs more refactoring, but since it is a minimal fix... Closes gh-13286
* | Merge pull request #13321 from eric-wieser/move-exceptionsEric Wieser2019-04-135-27/+28
|\ \ | | | | | | MAINT: Move exceptions from core._internal to core._exceptions
| * | MAINT: Move exceptions from core._internal to core._exceptionsEric Wieser2019-04-135-27/+28
| |/
* | BUILD: remove unused filemattip2019-04-131-42/+0
|/
* Merge pull request #11829 from eric-wieser/f2py-dedentCharles Harris2019-04-123-43/+42
|\ | | | | MAINT: Use textwrap.dedent in f2py tests
| * MAINT: Use textwrap.dedent in f2py testsEric Wieser2019-04-103-43/+42
| | | | | | | | Don't touch the fortran files, since indentation is signficant there and it makes things more error-prone
* | Merge pull request #13311 from eric-wieser/memmap-emptyTyler Reddy2019-04-122-1/+11
|\ \ | | | | | | BUG: Fix bad error message in np.memmap
| * | BUG: Fix bad error message in np.memmapEric Wieser2019-04-112-1/+11
| |/ | | | | | | | | | | | | | | | | | | | | | | This previously raisd `OSError: [Errno 22] Invalid argument` while trying to seek to byte -1 of the file. It now raises `ValueError: cannot mmap an empty file` The simple fix is not to write the file at all if we know it's already long enough. In future we could consider allowing memmap to do an extra write behind the scenes to ensure the fiel is not empty, but that seems out of scope. Fixes gh-12653
* | Merge pull request #13313 from eric-wieser/fix-typoRalf Gommers2019-04-121-1/+1
|\ \ | | | | | | MAINT: fix typo in 'self'
| * | MAINT: fix typo in 'self'Eric Wieser2019-04-111-1/+1
| |/
* | TST: fix up test_structured_paddedTyler Reddy2019-04-111-1/+1
| | | | | | | | | | | | | | | | | | * minor reviewer adjustments in PR 13301: in test_structured_padded it is necessary to perform the seek after writing to the file, and to specify a fmt option to match the expected result
* | BUG: Fix crash when calling savetxt on a padded arrayEric Wieser2019-04-112-2/+12
|/ | | | | | As a general rule, _every_ use of `.descr` is broken. Fixes #13297
* Merge pull request #13060 from bran206/masterCharles Harris2019-04-101-5/+31
|\ | | | | BUG: Use C call to sysctlbyname for AVX detection on MacOS
| * BUG: Use C call to sysctlbyname for AVX detection on MacOSBran2019-04-051-6/+14
| |
| * AVX detection fails on MacOS if $PATH doesn't contain /usr/sbin #7801Bran2019-03-141-15/+15
| |
| * AVX detection fails on MacOS if $PATH doesn't contain /usr/sbin #7801Bran2019-03-041-1/+1
| |
| * AVX detection fails on MacOS if ↵Bran2019-03-041-13/+19
| | | | | | | | /home/bran/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/mnt/c/Windows/System32:/mnt/c/Windows:/mnt/c/Windows/System32/wbem:/mnt/c/Windows/System32/WindowsPowerShell/v1.0:/mnt/c/Windows/System32/OpenSSH:/mnt/c/Program Files/dotnet:/mnt/c/Program Files/Microsoft SQL Server/130/Tools/Binn:/mnt/c/Program Files/PuTTY:/mnt/c/Users/Bran/AppData/Local/Programs/Python/Python37/Scripts:/mnt/c/Users/Bran/AppData/Local/Programs/Python/Python37:/mnt/c/Users/Bran/AppData/Local/Microsoft/WindowsApps:/mnt/c/Users/Bran/AppData/Local/Programs/Microsoft VS Code/bin:/snap/bin doesn't contain /usr/sbin #7801…
| * AVX detection fails on MacOS if $PATH doesn't contain /usr/sbin #7801 -- fixBran2019-02-271-5/+17
| |
* | Merge pull request #13291 from rgommers/fix-warningCharles Harris2019-04-101-5/+0
|\ \ | | | | | | MAINT: fix unused variable warning in npy_math_complex.c.src
| * | MAINT: fix unused variable warning in npy_math_complex.c.srcRalf Gommers2019-04-091-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Warnings: ``` x86_64-conda_cos6-linux-gnu-cc: numpy/core/src/npymath/npy_math.c numpy/core/src/npymath/npy_math_complex.c.src: In function 'npy_casinhf': numpy/core/src/npymath/npy_math_complex.c.src:1445:21: warning: unused variable 'pio2_hi' [-Wunused-variable] const @type@ pio2_hi = NPY_PI_2@c@; ^~~~~~~ numpy/core/src/npymath/npy_math_complex.c.src:1434:30: warning: unused variable 'pio2_lo' [-Wunused-variable] const volatile npy_float pio2_lo = 7.5497899549e-9f; ^~~~~~~ numpy/core/src/npymath/npy_math_complex.c.src: In function 'npy_casinh': numpy/core/src/npymath/npy_math_complex.c.src:1445:22: warning: unused variable 'pio2_hi' [-Wunused-variable] const @type@ pio2_hi = NPY_PI_2@c@; ^~~~~~~ numpy/core/src/npymath/npy_math_complex.c.src:1438:31: warning: unused variable 'pio2_lo' [-Wunused-variable] const volatile npy_double pio2_lo = 6.1232339957367659e-17; ^~~~~~~ numpy/core/src/npymath/npy_math_complex.c.src: In function 'npy_casinhl': numpy/core/src/npymath/npy_math_complex.c.src:1445:26: warning: unused variable 'pio2_hi' [-Wunused-variable] const @type@ pio2_hi = NPY_PI_2@c@; ^~~~~~~ numpy/core/src/npymath/npy_math_complex.c.src:1442:35: warning: unused variable 'pio2_lo' [-Wunused-variable] const volatile npy_longdouble pio2_lo = 2.710505431213761085e-20l; ^~~~~~~ ```
* | | Merge pull request #13161 from zerothi/linalg-cblasMatti Picus2019-04-101-20/+40
|\ \ \ | | | | | | | | BLD: streamlined CBLAS linkage tries, default to try libraries *as-is*
| * | | BLD: streamlined CBLAS linkage tries, default to try libraries *as-is*Nick Papior2019-04-101-20/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes CBLAS testing a bit easier since it checks 5 cases: - user-defined libraries - cblas + user-defined libraries - blas + user-defined libraries - cblas - blas In given order. Since the has_cblas changed API it also changed name to get_cblas_libs.
* | | | Merge pull request #13219 from kikocorreoso/nan_to_num-enhancementAllan Haldane2019-04-092-9/+77
|\ \ \ \ | |_|/ / |/| | | ENH: nan_to_num keyword addition (was #9355)
| * | | update testskikocorreoso2019-04-091-9/+7
| | | |
| * | | fix test namekikocorreoso2019-04-091-1/+1
| | | |
| * | | address comments on #9355kikocorreoso2019-03-302-9/+79
| | | |
* | | | ENH: rotate companion matrix for all polynomial basesTyler Moncur2019-04-086-7/+13
| | | |
* | | | ENH: use rotated companion matrix to reduce errorTyler Moncur2019-04-081-1/+1
| | | |
* | | | Merge pull request #13259 from spacescientist/masterMatti Picus2019-04-081-2/+2
|\ \ \ \ | | | | | | | | | | DOC: Small readability improvement in random.binomial
| * | | | DOC: Small readability improvementspacescientist2019-04-041-2/+2
| | | | |
* | | | | Merge pull request #13273 from jwilk-forks/dtypefromobject-nullptrCharles Harris2019-04-062-1/+7
|\ \ \ \ \ | | | | | | | | | | | | BUG: Fix null pointer dereference in PyArray_DTypeFromObject
| * | | | | BUG: Fix null pointer dereference in PyArray_DTypeFromObjectHelperJakub Wilk2019-04-062-1/+7
| | | | | |
* | | | | | DOC : Correcting bug on Documentation Page (Byteswapping) (#13262)vrindaaa2019-04-061-10/+10
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | * Correcting bug on Documentation Page : Byteswapping * Changing name of variable
* | | | | ENH: vectorize np.abs for unsigned ints and half, improving performance up ↵Christopher Whelan2019-04-051-10/+4
| | | | | | | | | | | | | | | | | | | | to 12x
* | | | | MAINT: f2py: Add a cast to avoid a compiler warning.Warren Weckesser2019-04-051-1/+1
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The warning [...]/fortranobject.c:138:18: warning: comparison of integers of different signs: 'Py_ssize_t' (aka 'long') and 'unsigned long' [-Wsign-compare] if (size < sizeof(notalloc)) { ~~~~ ^ ~~~~~~~~~~~~~~~~ occurs 17 times when scipy is built. The change in this pull request casts `size` to `size_t` before comparing it to `sizeof(...)`. A previous check has already eliminated the possibility that `size` is negative, so this cast is safe.
* | | | Merge pull request #13243 from adeak/maint_flat_nosetref_refactorCharles Harris2019-04-021-2/+3
|\ \ \ \ | | | | | | | | | | MAINT: replace SETREF with assignment to ret array in ndarray.flat
| * | | | MAINT: replace SETREF with assignment to ret array in ndarray.flatAndras Deak2019-04-021-2/+3
| | | | |
* | | | | DOC: fix docstring for floor_divide (#13242)Assem2019-04-022-3/+3
| | | | | | | | | | | | | | | * DOC: fix docstring for floor_divide
* | | | | DOC: Improve mtrand docstringsKevin Sheppard2019-04-021-23/+22
|/ / / / | | | | | | | | | | | | | | | | | | | | Remove excess underscores Fix lognormal docstring Standardize whitesapce
* | | | BUG/MAINT: fix reference count error on invalid input to ndarray.flat (#13176)adeak2019-04-012-25/+41
| | | | | | | | | | | | | | | | | | | | | | | | Fixes gh-13165, where a double decref could occur on the error path. Folded into this commit is some related control flow cleanup requested at review time.
* | | | BUG: Fix of `var` method for complex object arraysChirag Nighut2019-04-012-3/+7
| | | | | | | | | | | | | | | | | | | | Previously, an object array which contained complex numbers would give complex output, as it was simply multiplied with itself instead of with its conjugate.
* | | | Merge pull request #13226 from bashtage/mtrand-doc-cleanMatti Picus2019-03-311-12/+12
|\ \ \ \ | | | | | | | | | | DOC: Fix small issues in mtrand doc strings
| * | | | DOC: Fix small issues in mtrand doc stringsKevin Sheppard2019-03-311-12/+12
| |/ / / | | | | | | | | | | | | | | | | Remove overly long underscore Remove trailing whitespace
* | | | Merge pull request #13208 from qwhelan/charris_followupMatti Picus2019-03-312-71/+62
|\ \ \ \ | | | | | | | | | | MAINT: cleanup of fast_loop_macros.h