summaryrefslogtreecommitdiff
path: root/numpy
Commit message (Collapse)AuthorAgeFilesLines
* 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 #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)
* | | | | 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 #6962 from rehassachdeva/BugFixesCharles Harris2016-01-091-1/+1
|\ \ \ \ \ | | | | | | | | | | | | MAINT, STY: Removed unused variable in f2py/f90mod_rules.py
| * | | | | MAINT, STY: Removed unused variable in f2py/f90mod_rules.pyrehassachdeva2016-01-071-1/+1
| | | | | |
* | | | | | Merge pull request #6982 from charris/update-6972Charles Harris2016-01-091-3/+5
|\ \ \ \ \ \ | | | | | | | | | | | | | | DOC: Update 6972
| * | | | | | DOC: Update trapz docstring.Charles Harris2016-01-091-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | [ci skip]
| * | | | | | DOC: fix typos in trapz()François Boulogne2016-01-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | [ci skip]
* | | | | | | DOC: Clarify the docstrings of matrix.argmin and matrix.argmax.Charles Harris2016-01-091-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | [ci skip]
* | | | | | | DOC: Update defmatrix.argmax docstring.Nicolás Della Penna2016-01-091-1/+1
|/ / / / / / | | | | | | | | | | | | | | | | | | [ci skip]
* | | | | | 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
| * | | | | STY: Place braces on the same lines as control structure requiring them.John Kirkham2016-01-091-24/+12
| | |/ / / | |/| | |
* | | | | BUG: npy_acosh fallback too simple.Eric Moore2016-01-081-1/+14
|/ / / / | | | | | | | | | | | | Fixes gh-6712.
* | | | Merge pull request #6955 from rgommers/distutils-cleanupCharles Harris2016-01-0729-392/+8
|\ \ \ \ | |/ / / |/| | | MAINT: distutils cleanup for Pyrex support and unused f2py/swig tests
| * | | MAINT: remove unused f2py and SWIG tests from numpy.distutils.Ralf Gommers2016-01-0625-301/+0
| | | |
| * | | MAINT: remove outdated Pyrex support from distutils (as far as possible).Ralf Gommers2016-01-068-92/+9
| | | |
* | | | Merge pull request #6932 from jakirkham/opt_dot_transNathaniel J. Smith2016-01-061-1/+96
|\ \ \ \ | | | | | | | | | | ENH: Use `syrk` to compute certain dot products more quickly and accurately
| * | | | ENH: Use the helper function `syrk` to compute `dot` more quickly and ↵John Kirkham2016-01-061-1/+28
| | | | | | | | | | | | | | | | | | | | accurately in certain special cases.
| * | | | ENH: Added the helper function `syrk` that computes `a.T @ a` or `a @ a.T`.John Kirkham2016-01-061-0/+68
| | | | |
* | | | | Merge pull request #6905 from kohr-h/issue-6899__broadcast_with_one_argJaime2016-01-064-14/+17
|\ \ \ \ \ | |/ / / / |/| | | | ENH: allow single input argument in numpy.broadcast
| * | | | TST: add test for broadcast with one argumentHolger Kohr2016-01-042-5/+11
| | | | |
| * | | | ENH: allow single input argument in numpy.broadcastHolger Kohr2016-01-042-9/+6
| | | | |