summaryrefslogtreecommitdiff
path: root/numpy
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #13063 from mattip/doc-fixes2Ralf Gommers2019-03-011-3/+3
|\ | | | | DOC: revert PR #13058 and fixup Makefile
| * DOC: revert #13058 and fix Makefilemattip2019-03-011-3/+3
| |
* | BUG: Fixes to numpy.distutils.Configuration.get_version (#13056)Eric Wieser2019-03-011-33/+22
|/ | | | | | | | | | | | | | | | | | | | * BUG: Use subprocess.check_output to avoid leaking file handles This emitted a ResourceWarning as previously written, as the streams never got closed. This change also detects errors in `svnversion` and `hg`, rather than ignoring the error code and hoping stdout contains a revision anyway. * BUG: Fix distutils.get_version on python 3 Previously, this would throw `TypeError: cannot use a string pattern on a bytes-like object`, which would then be silenced and never seen. The previous commit stopped silencing this error, so now everything is visibly broken rather than silently broken Changing the strings to raw strings fixes the problem * BUG: Don't use `close_fds`, which fails on windows This argument was introduced along with subprocess in f5afa7836d56640f25ff3fbd2c59b8dcf016e26f to replace `popen4`, and probably wasn't necessary in the first place.
* Merge pull request #13058 from euronion/euronion-patch-1Matti Picus2019-03-011-3/+3
|\ | | | | DOC: update docstring in numpy.interp docstring
| * DOC: Update interp docstringeuronion2019-02-281-3/+3
| | | | | | | | Adding 'strictly' to make the conditions to be met by the `xp` argument even more clear. Following the suggestion in https://github.com/numpy/numpy/issues/10448#issuecomment-468302058 .
* | DOC: fixes from reviewmattip2019-02-281-6/+8
| |
* | DOC: fixes from reviewmattip2019-02-283-37/+62
| |
* | DOC: reduce warnings when building, reword, tweak doc buildingmattip2019-02-287-80/+107
|/
* Merge pull request #13035 from eric-wieser/random-matlab-aliasesMatti Picus2019-02-281-23/+53
|\ | | | | DOC: Draw more attention to which functions in random are convenience wrappers
| * DOC: Encourage users to use the non-matlab-style random functionsEric Wieser2019-02-271-17/+49
| | | | | | | | In response to twitter conversations that complain that `randn` is inconsistent with `zeros`, to which the answer is "that's because randn is a wrapper to make things look like matlab".
| * DOC: Remove incorrect statement about `randn` accepting floats as sizesEric Wieser2019-02-241-6/+4
| | | | | | | | This gives an error at least as far back as 1.12.x
* | Merge pull request #13033 from alexcwatt/property-cleanupMatti Picus2019-02-286-130/+92
|\ \ | | | | | | MAINT: Convert property to @property
| * | DOC: Simplify .real and .imag docstrings for MaskedArrayEric Wieser2019-02-271-22/+4
| | |
| * | MAINT: First pass at merging docstringsAlex Watt2019-02-241-56/+26
| | |
| * | MAINT: respond to PR feedbackAlex Watt2019-02-241-9/+9
| | |
| * | MAINT: Convert property to @propertyAlex Watt2019-02-246-58/+68
| |/
* | Merge pull request #13054 from madphysicist/maximum_sctype-docsMatti Picus2019-02-272-1/+1
|\ \ | | | | | | DOC: Added maximum_sctype to documentation
| * | DOC: Added maximum_sctype to documentationJoseph Fox-Rabinovitz2019-02-272-1/+1
| | |
* | | Merge pull request #13039 from mattip/remove-borrowed-refsMarten van Kerkwijk2019-02-262-37/+53
|\ \ \ | | | | | | | | BUG: remove error-prone borrowed reference handling
| * | | BUG: fixes from reviewmattip2019-02-262-4/+10
| | | |
| * | | BUG: fixes from reviewmattip2019-02-262-2/+10
| | | |
| * | | BUG: fixes from reviewmattip2019-02-251-7/+8
| | | |
| * | | BUG: remove error-prone borrowed reference handlingmattip2019-02-251-33/+34
| | | |
* | | | Merge pull request #13019 from tylerjereddy/windows_conda_dll_option2Charles Harris2019-02-251-1/+25
|\ \ \ \ | | | | | | | | | | BLD: Windows absolute path DLL loading
| * | | | MAINT: emit single Warning for multiple DLLsTyler Reddy2019-02-251-3/+2
| | | | |
| * | | | MAINT: use os.path for Python 2.x compatTyler Reddy2019-02-221-6/+7
| | | | |
| * | | | MAINT: probe multiple DLL handling on WinTyler Reddy2019-02-221-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Test for DLL pollution in numpy/.libs/ in Azure CI Windows Python 3.6 builds * emit a warning with DLL names when > 1 are present in numpy/.libs/
| * | | | BLD: Windows absolute path DLL loadingTyler Reddy2019-02-221-1/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * add an Azure CI test to mimic recent Anaconda DLL path resolution restrictions that prevent NumPy imports * patch numpy.core initialization to use absolute DLL path loading to overcome the scenario described above
* | | | | Merge pull request #13032 from eric-wieser/fast_loop_macros.hCharles Harris2019-02-252-193/+220
|\ \ \ \ \ | |_|_|/ / |/| | | | MAINT: Extract the loop macros into their own header
| * | | | MAINT: Improve docs of simple macros and group them togetherEric Wieser2019-02-241-34/+48
| | | | | | | | | | | | | | | | | | | | @{ is doxygen syntax, which we're not actually using - but it at least makes it sort of possible to see the scope of the comment.
| * | | | MAINT: Extract the loop macros into their own headerEric Wieser2019-02-242-193/+206
| | |_|/ | |/| | | | | | | | | | This makes it possible to use them in other source files (if we go down a source-per-ufunc approach later), and if nothing else makes a very long file a little less long.
* | | | Merge pull request #10855 from madphysicist/unpack-countSebastian Berg2019-02-254-125/+177
|\ \ \ \ | | | | | | | | | | ENH: Adding a count parameter to np.unpackbits
| * | | | ENH: Added count parameter to unpackbitsJoseph Fox-Rabinovitz2019-02-254-125/+177
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tests are included. Couple of minor fixes: - Fixed packbits/unpackbits docs to reflect proper keyword names - Added .pytest_cache to .gitignore
* | | | | Merge pull request #12989 from eric-wieser/inter-inf-alternativeSebastian Berg2019-02-252-3/+96
|\ \ \ \ \ | |/ / / / |/| | | | ENH: Correct handling of infinities in np.interp (option B)
| * | | | ENH: Improve handling of infinities in np.interpEric Wieser2019-02-242-3/+96
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Alternative to gh-12978, using a method that does not need a lot of special cases. This is likely more robust in the face of overflow Fixes gh-12951.
* | | | | Merge pull request #12925 from eric-wieser/distutils-shlex-splitCharles Harris2019-02-252-5/+9
|\ \ \ \ \ | |_|_|_|/ |/| | | | BUG: parse shell escaping in extra_compile_args and extra_link_args
| * | | | BUG: parse shell escaping in extra_compile_args and extra_link_argsEric Wieser2019-02-242-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Thanks to a change in exec_command, these strings are no longer passed onto the shell. Since config files do not support list values, our best bet is to perform shell-splitting immediately. This brings the behavior back in line a little to how it was before. On windows systems, the behavior has changed. Previously it was treated as a single argument unless it contained quotes, resulting in the following weird behavior: # passes as one argument, preserving spaces extra_link_args=-Wl,rpath=A:/path/with spaces # passes as two arguments, preserving spaces extra_link_args="-Wl,rpath=A:\path\with spaces" -lgfortran # passes as one long quoted argument (surprising and undesirable) extra_link_args=-Wl,rpath=A:\path\without_spaces -lgfortran Now it behaves as windows escaping via subprocess (but _not_ via cmd) normally would: # Passed as two separate arguments (probably not as intended, but should be expected) extra_link_args=-Wl,rpath=A:/path/with spaces # passes as two arguments, preserving spaces extra_link_args="-Wl,rpath=A:\path\with spaces" -lgfortran # passes as two arguments extra_link_args=-Wl,rpath=A:\path\without_spaces -lgfortran Fixes gh-12659
* | | | | MAINT: Replace if statement with a dictionary lookup for ease of ↵Eric Wieser2019-02-241-50/+64
| |_|/ / |/| | | | | | | | | | | extensibility in ufunc generator
* | | | Merge pull request #13027 from eric-wieser/distutils-fortran-env-varCharles Harris2019-02-241-4/+4
|\ \ \ \ | | | | | | | | | | BUG: Fix regression in parsing of F90 and F77 environment variables
| * | | | BUG: Fix regression in parsing of F90 and F77 environment variablesEric Wieser2019-02-241-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes gh-12979 Among other things, this means setting the `F90` environment variable to `"path to/f90" --coverage` works again.
* | | | | TST: Add test for np.tensordot on 0d arrays (#12152)Rishabh Chakrabarti2019-02-241-0/+6
|/ / / / | | | | | | | | | | | | | | | | | | | | Collapsing none of the axes on an array with no axes should be expected to work just fine. Relates to gh-12130
* | | | Merge pull request #13023 from eric-wieser/distutils-windows-splitCharles Harris2019-02-242-0/+170
|\ \ \ \ | |/ / / | | | | BUG: Changes to string-to-shell parsing behavior broke paths with quotes
| * | | MAINT: Add functions to parse shell-strings in the platform-native wayEric Wieser2019-02-232-0/+170
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are places in distutils where we accept a single string from the user, and interpret it as a set of command line arguments. Previously, these were passed on as a string unmodified to exec_command, and interpreted by subprocess in a platform-specific way. Recent changes to distutils now pass a list of arguments to subprocess, meaning we have to split the strings ourselves. While `shlex.split` is perfect on posix systems, it is not a good approximation of either the old or the expected behavior on windows. Provides the building blocks needed to fix gh-12979
* | | | Merge pull request #12846 from tlatorre-uchicago/divmod-bugfixCharles Harris2019-02-222-2/+8
|\ \ \ \ | | | | | | | | | | BUG: fix signed zero behavior in npy_divmod
| * | | | BUG: fix signed zero behavior in npy_divmodtlatorre2019-02-182-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously when doing floor division numpy would sometimes return an incorrect signed zero. For example: >>> np.zeros(10)//1 array([-0., -0., -0., -0., -0., -0., -0., -0., -0., -0.]) >>> np.remainder(-1.0,1.0) -0.0 The reason for this is that whenever div or mod were zero the code was using the following to pick the sign of zero: floordiv = (a / b > 0) ? 0.0@c@ : -0.0@c@; This commit updates these lines to instead use the copysign function which is how cpython does floor division. Fixes #12841.
* | | | | DOC: Recommend adding dimension to switch between row and column vectors ↵Ian Sanders2019-02-221-3/+6
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (#12973) * DOC: Recommend using reshape instead of matrix for vector transpose * Rephrase doc advice for 1-D vector transpose Recommend adding a dimension instead of using `reshape`. Per @eric-wieser, makes explanation more technical. * Fix grammar
* | | | Merge pull request #12831 from petronny/patch-1Matti Picus2019-02-221-1/+1
|\ \ \ \ | | | | | | | | | | BUG: do not catch stderr when checking compiler version
| * | | | also match the stderr in get_version()Jingbei Li2019-01-231-1/+1
| | | | | | | | | | | | | | | which used to fail for ifort
* | | | | MAINT: Move pickle import to numpy.compatCharles Harris2019-02-2117-30/+24
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | The pickle module was being imported from numpy.core.numeric. It was defined there in order to use pickle5 when available in Python3 and cpickle in Python2. The numpy.compat module seems a better place for that.
* | | | Merge pull request #12996 from eric-wieser/complex-interp-slope-cleanupMatti Picus2019-02-201-7/+8
|\ \ \ \ | | | | | | | | | | MAINT: Use the same multiplication order in interp for cached and uncached slopes