summaryrefslogtreecommitdiff
path: root/numpy/core
Commit message (Collapse)AuthorAgeFilesLines
* MAINT: Fix some typos in a code string and commentsDongjoon Hyun2016-01-2718-20/+20
|
* BLD: fix compilation on non glibc-LinuxesDmitry Odzerikho2016-01-221-11/+8
| | | | | Non-glibc Linuxes dont have the __GLIBC_PREREQ function and compilation of numpy fails on such platforms.
* REL: Prepare for 1.10.x branch.Charles Harris2016-01-192-0/+2
| | | | | | | * Add comment to cversions.txt (no change) * Add comment to setup_common.py (no change) * Nothing done for numpy/core/include/numpy/numpyconfig.h * Update log start to 1.10.0 in pavement.py.
* Merge pull request #7027 from gfyoung/test_fromnumeric_expandCharles Harris2016-01-193-166/+461
|\ | | | | TST, MAINT: Lots of new tests for fromnumeric.py
| * TST: Added lots of new tests for fromnumeric.pygfyoung2016-01-183-166/+461
| |
* | TST: Add tests for NAT comparison FutureWarning.Charles Harris2016-01-181-0/+28
| | | | | | | | | | The behavior of NAT comparisons will change in Numpy 1.13. Make sure that a FutureWarning is emitted when the results will change.
* | DEP: Emit FutureWarning for NAT comparisons.Charles Harris2016-01-181-3/+41
|/ | | | | | In Numpy 1.13 the plan is for NAT comparisons to behave like NaN comparisons, e.g., False except for 'NAT != NAT', which will be True. See the discussion at gh-7019 for details.
* TST: np.isclose, correct error msg on testAndrew Nelson2016-01-181-1/+1
|
* Merge pull request #6608 from stuarteberg/fix-api-version-warning-intsCharles Harris2016-01-171-2/+2
|\ | | | | MAINT: Add '0x' to API version error for clarity.
| * MAINT: Add '0x' to API version error for clarity.Stuart Berg2016-01-171-2/+2
| |
* | Merge pull request #7042 from charris/revert-7001Charles Harris2016-01-164-57/+13
|\ \ | | | | | | Revert "Merge pull request #7001 from shoyer/NaT-comparison"
| * | Revert "Merge pull request #7001 from shoyer/NaT-comparison"Charles Harris2016-01-164-57/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 7141f40b58ed1e7071cde78ab7bc8ab37e9c5983, reversing changes made to 8fa6e3bef26a6d4a2c92f2824129aa4409be2590. The original broke some pandas tests. The current plan to get this in is * reversion * issue FutureWarning in 1.11 and 1.12 * make the change in 1.13.
* | | Merge pull request #6453 from shoyer/naive-datetime64Charles Harris2016-01-168-432/+275
|\ \ \ | | | | | | | | API: Make datetime64 timezone naive
| * | | API: Make datetime64 timezone naiveStephan Hoyer2016-01-158-432/+275
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes GH3290 With apologies to mwiebe, this rips out most of the time zone parsing from the datetime64 type. I think we mostly sorted out the API design in discussions last year, but I'll be posting this to the mailing list shortly to get feedback. Old behavior: # string parsing and printing defaults to your local timezone :( >>> np.datetime64('2000-01-01T00') numpy.datetime64('2000-01-01T00:00-0800','h') New behavior: # datetime64 is parsed and printed as timezone naive >>> np.datetime64('2000-01-01T00') numpy.datetime64('2000-01-01T00','h') # you can still supply a timezone, but you get a deprecation warning >>> np.datetime64('2000-01-01T00Z') DeprecationWarning: parsing timezone aware datetimes is deprecated; this will raise an error in the future numpy.datetime64('2000-01-01T00','h')
* | | | Merge pull request #7038 from jakirkham/cblasfuncs_sty_fixesCharles Harris2016-01-161-7/+12
|\ \ \ \ | |_|/ / |/| | | STY: Wrap some long lines in `cblasfuncs.c`
| * | | STY: Wrap some long lines.John Kirkham2016-01-161-7/+12
| | | |
* | | | Merge pull request #7031 from charris/cleanup-6699Charles Harris2016-01-162-7/+76
|\ \ \ \ | | | | | | | | | | Cleanup 6699, BUG: fix issues with signed zeros in scalar math complex division.
| * | | | BUG: fix issues with signed zeros in scalar math complex division.Stuart Archibald2016-01-162-7/+76
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current algorithm used in scalar math complex division appears to incorrectly handle signed zeros. This patch duplicates the algorithm used for complex division in the loops.c.src file into the scalarmath.c.src file so the algorithms are consistent regardless of context. Unit tests are added in the scalar context for testing the correctness of sign when zeros are encountered and also to trip the new branches in the now consistent algorithm.
* | | | Merge pull request #7022 from charris/fix-divmodCharles Harris2016-01-164-26/+90
|\ \ \ \ | |/ / / |/| | | BUG: Fix divmod
| * | | TST: Add tests for divmodCharles Harris2016-01-162-3/+79
| | | |
| * | | BUG: Make divmod behave better under roundoff error.Charles Harris2016-01-152-23/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is apropos #6127. The fix is to make the functions floor_division and remainder consistent, i.e., b * floor_division(a, b) + remainder(a, b) == a Previous to this fix remainder was computed a the C level using the '%' operator, and the result was not always consistent with the floor function. The current approach is to compute the remainder using b * (a/b - floor(a/b)) which is both consistent with the Python '%' operator and numerically consistent with floor_division implemented using the floor function. Closes #6127.
* | | | Fix issue 7021=2016-01-162-0/+10
| | | |
* | | | Merge pull request #6987 from jakirkham/test_dot_inner_type_failuresCharles Harris2016-01-152-2/+3
|\ \ \ \ | | | | | | | | | | TST, MAINT: Make sure exceptions of `inner` and `dot` match for different cases
| * | | | MAINT: Ensure `inner` is raising a ValueError just as `dot` does in the same ↵John Kirkham2016-01-152-2/+3
| | |/ / | |/| | | | | | | | | | case.
* | | | Merge pull request #7000 from gfyoung/ndarray_arg_enforceStephan Hoyer2016-01-152-1/+24
|\ \ \ \ | | | | | | | | | | DOC, MAINT: Enforce np.ndarray arg for np.put and np.place
| * | | | DOC, MAINT: Enforce np.ndarray arg for np.put and np.placegfyoung2016-01-142-1/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | np.put and np.place do something only when the first argument is an instance of np.ndarray. These changes will cause a TypeError to be thrown in either function should that requirement not be satisfied.
* | | | | MAINT: ensureisclose returns scalar when called with two scalarsAndrew Nelson2016-01-152-2/+18
| |/ / / |/| | |
* | | | Merge pull request #7015 from njsmith/fix-1.10-messagesCharles Harris2016-01-141-3/+3
|\ \ \ \ | |_|/ / |/| | | DOC: Clean up/fix several references to the "future" 1.10 release
| * | | DOC: Clean up/fix several references to the "future" 1.10 releaseNathaniel J. Smith2016-01-141-3/+3
| | | | | | | | | | | | | | | | Fixes gh-7010
* | | | TST, ENH: make all comparisons with NaT falseStephan Hoyer2016-01-144-13/+57
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | Now, NaT compares like NaN: - NaT != NaT -> True - NaT == NaT (and all other comparisons) -> False We discussed this on the mailing list back in October: https://mail.scipy.org/pipermail/numpy-discussion/2015-October/073968.html
* | | Merge pull request #6465 from shoyer/datetime64-NaT-castingCharles Harris2016-01-142-8/+35
|\ \ \ | | | | | | | | BUG: fix casting rules for generic datetime64/timedelta64 dtypes
| * | | BUG: fix casting rules for generic datetime64/timedelta64 unitsStephan Hoyer2015-10-132-8/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes GH6452 There are two types of datetime64/timedelta64 objects with generic times units: * NaT * unit-less timedelta64 objects Both of these should be safely castable to any more specific dtype. However, more specific dtypes should not be safely castable to generic units. Otherwise, the result of `np.datetime64('NaT')` or `np.timedelta(1)` is entirely useless, because they can't be used in any arithmetic operations or comparisons. This is a regression from NumPy 1.9, where these sort of operations worked because the default casting rules with ufuncs were less strict.
* | | | Merge pull request #6975 from charris/add-cacosh-to-glibc-blacklistCharles Harris2016-01-121-0/+6
|\ \ \ \ | | | | | | | | | | BUG: Add more complex trig functions to glibc < 2.16 blacklist.
| * | | | BUG: Add more complex trig functions to glibc < 2.16 blacklist.Charles Harris2016-01-081-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added functions are - cacos - cacosf - cacosl - cacosh - cacoshf - cacoshl Closes #6063.
* | | | | MAINT: Refactor `PyArray_InnerProduct` so that it just performs a transpose ↵John Kirkham2016-01-113-135/+34
| | | | | | | | | | | | | | | | | | | | and calls `PyArray_MatrixProduct2`.
* | | | | MAINT: Refactor `cblas_innerproduct` to use `cblas_matrixproduct`.John Kirkham2016-01-111-129/+9
| | | | |
* | | | | BUG: Clear error before constructing error message using calls to ↵John Kirkham2016-01-111-4/+24
| | | | | | | | | | | | | | | | | | | | `PyObject_Repr`. Also, do a better job of handling any errors raised while constructing the error message.
* | | | | TST: Ensure `inner` fails correctly if array types cannot be coerced into a ↵John Kirkham2016-01-111-0/+7
| | | | | | | | | | | | | | | | | | | | common type.
* | | | | TST: Ensure `dot` fails correctly if array types cannot be coerced into a ↵John Kirkham2016-01-111-0/+7
| |_|/ / |/| | | | | | | | | | | common type.
* | | | BUG: make result of isfinite/isinf/signbit a booleanJulian Taylor2016-01-111-4/+4
| | | | | | | | | | | | | | | | | | | | may return something else than one or zero and npy_bool is unfortunately an int8 not a c99 bool
* | | | Merge pull request #6980 from juliantaylor/vect-isfiniteCharles Harris2016-01-103-35/+169
|\ \ \ \ | | | | | | | | | | ENH: vectorize isinf and isfinite
| * | | | ENH: vectorize isinf, isfinite and signbitJulian Taylor2016-01-103-35/+169
| | | | | | | | | | | | | | | | | | | | | | | | | isfinite is especially valuable as its needed to verify inputs are suitable for lapack.
* | | | | Merge pull request #6630 from shoyer/moveaxisseberg2016-01-103-11/+175
|\ \ \ \ \ | | | | | | | | | | | | ENH: moveaxis function
| * | | | | ENH: moveaxis functionStephan Hoyer2016-01-093-11/+175
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes GH2039 This function provides a much more intuitive interface than `np.rollaxis`, which has a confusing behavior with the position of the `start` argument: http://stackoverflow.com/questions/29891583/reason-why-numpy-rollaxis-is-so-confusing It was independently suggested several times over the years after discussions on the mailing list and GitHub (GH2039), but never made it into a pull request: https://mail.scipy.org/pipermail/numpy-discussion/2010-September/052882.html My version adds support for a sequence of axis arguments. I find this behavior to be very useful. It is often more intuitive than supplying a list of arguments to `transpose` and also nicely generalizes NumPy's existing axis manipulation routines, e.g., def transpose(a, order=None): if order is None: order = reversed(range(a.ndim)) return moveaxes(a, order, range(a.ndim)) def swapaxes(a, axis1, axis2): return moveaxes(a, [axis1, axis2], [axis2, axis1]) def rollaxis(a, axis, start=0): if axis < start: start -= 1 return moveaxes(a, axis, start)
* | | | | TST: Add an `inner` test with two 3D tensors.John Kirkham2016-01-091-0/+27
| | | | |
* | | | | TST: Add more scalar tests to ensure `inner` keeps the answer with the right ↵John Kirkham2016-01-091-0/+16
| | | | | | | | | | | | | | | | | | | | form.
* | | | | TST: Try using `inner` with some different orderings for matrix and vector ↵John Kirkham2016-01-091-0/+9
| | | | | | | | | | | | | | | | | | | | products. Add some tests for matrix products. Include a `syrk` vs. `gemm` test case.
* | | | | Merge pull request #6978 from kpsychas/patch-1Ralf Gommers2016-01-091-1/+1
|\ \ \ \ \ | |_|/ / / |/| | | | BLD: fix build error for mingw32 compiler on Windows
| * | | | fix for windowsKonstantinos Psychas2016-01-081-1/+1
| | | | | | | | | | | | | | | Related Issue http://stackoverflow.com/questions/33886558/numpy-installation-error-mingw32ccompiler-instance-has-no-attribute-compile-o
* | | | | Merge pull request #6979 from jakirkham/cblas_matrixproduct_bracesNathaniel J. Smith2016-01-091-24/+12
|\ \ \ \ \ | |/ / / / |/| | | | STY: Place conditional opening braces on the same line