summaryrefslogtreecommitdiff
path: root/numpy
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | DOC: document changes to assert_warnsStephan Hoyer2016-01-161-0/+4
| | | | |
| * | | | 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')
| * | | | TST: Make assert_warns an optional contextmanagerStephan Hoyer2016-01-142-18/+66
| | | | |
* | | | | 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.
* | | | | Merge pull request #7028 from sam09/fix-7021Charles Harris2016-01-162-0/+10
|\ \ \ \ \ | | | | | | | | | | | | Fix issue #7021
| * | | | | Fix issue 7021=2016-01-162-0/+10
| | | | | |
* | | | | | Merge pull request #7029 from rgommers/fix-interrupted-rebuildCharles Harris2016-01-161-6/+6
|\ \ \ \ \ \ | | | | | | | | | | | | | | BLD: fix rebuilding after a failed build. Closes gh-5467.
| * | | | | | BLD: fix rebuilding after a failed build. Closes gh-5467.Ralf Gommers2016-01-161-6/+6
| |/ / / / / | | | | | | | | | | | | | | | | | | Also remove bench(), does't do anything here after the move to asv.
* | | | | | Merge pull request #6895 from rgommers/packagingCharles Harris2016-01-162-1/+25
|\ \ \ \ \ \ | |/ / / / / |/| | | | | BLD: build improvements (enable setuptools)
| * | | | | TST: fix issues with test for correctness of numpy version string.Ralf Gommers2016-01-161-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | Addresses comments of @pv on gh-6895.
| * | | | | TST: add test to check for correct version string format.Ralf Gommers2016-01-161-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | Implements idea suggested in gh-6431.
| * | | | | BUG: make distutils.misc_util.is_string recognize unicode.Ralf Gommers2016-01-161-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This was triggered by the numpy version string (which is unicde) being included in metadata. This could also solve other problems for external users of numpy.distutils.
* | | | | | Merge pull request #7020 from jakirkham/deprecated_masked_array_mask_copyCharles Harris2016-01-153-0/+26
|\ \ \ \ \ \ | |/ / / / / |/| | | | | DEP: Warn MaskedArray will return views of mask when sliced
| * | | | | TEST: Ignore `FutureWarning` if raised from running masked array operations.John Kirkham2016-01-152-0/+9
| | | | | |
| * | | | | DEP: Add warnings to `__getitem__` and `__setitem__` to point out the ↵John Kirkham2016-01-151-0/+17
| | |/ / / | |/| | | | | | | | | | | | | behavior of `MaskedArray`'s masks is changing.
* | | | | 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-155-6/+33
|\ \ \ \ \ | | | | | | | | | | | | 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-145-6/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 #6912 from gfyoung/asarray_orderCharles Harris2016-01-142-16/+41
|\ \ \ \ \ | | | | | | | | | | | | BUG: Enforce Order Param for MaskedArray Construction
| * | | | | BUG: Enforce order param for MaskedArray constructiongfyoung2016-01-152-16/+41
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds the 'order' parameter to the __new__ override in MaskedArray construction, enabling it to be enforced in methods like np.ma.core.array and np.ma.core.asarray. Closes gh-6646.
* | | | | Merge pull request #7015 from njsmith/fix-1.10-messagesCharles Harris2016-01-142-4/+4
|\ \ \ \ \ | |/ / / / |/| | | | 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-142-4/+4
| | | | | | | | | | | | | | | | | | | | Fixes gh-7010
* | | | | TST, ENH: make all comparisons with NaT falseStephan Hoyer2016-01-148-24/+135
| |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | Fix number sequenceAbdullah Alrasheed2016-01-141-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I have found that there are two missing numbers in a sequence in the documentation. http://docs.scipy.org/doc/numpy/user/misc.html#interfacing-to-c It goes 1,2,3,5,7,8 with missing 4 and 6.
* | | | | BUG: skip invalid path distutils warning for empty stringsJulian Taylor2016-01-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | empty strings are the default for the new rpath, extra_compile_args and extra_link_args sections
* | | | | Merge pull request #6728 from ↵ahaldane2016-01-122-0/+24
|\ \ \ \ \ | |_|_|/ / |/| | | | | | | | | | | | | | gerritholl/structured_multidim_masked_array_fillvalue BUG/TST: Fix for #6723 including test: force fill_value.ndim==0
| * | | | BUG/TST: Fix for #6723 including test: force fill_value.ndim==0Gerrit Holl2015-12-072-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix issue #6723. Given an exotic masked structured array, where one of the fields has a multidimensional dtype, make sure that, when accessing this field, the fill_value still makes sense. As it stands prior to this commit, the fill_value will end up being multidimensional, possibly with a shape incompatible with the mother array, which leads to broadcasting errors in methods such as .filled(). This commit uses the first element of this multidimensional fill value as the new fill value. When more than one unique value existed in fill_value, a warning is issued. Also add a test to verify that fill_value.ndim remains 0 after indexing.
* | | | | 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
* | | | | DEP: Deprecate random_integersgfyoung2016-01-102-0/+28
| | | | |
* | | | | 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)