summaryrefslogtreecommitdiff
path: root/numpy
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #4542 from immerrr/fix-bincount-systemerrorCharles Harris2014-03-263-17/+113
|\ | | | | BUG: fix some errors raised when minlength is incorrect in np.bincount
| * BUG: fix incorrect minlength handling in np.bincountimmerrr2014-03-262-16/+32
| |
| * ENH: export nose.tools.assert_raises_regex via numpy.testing.utilsimmerrr2014-03-261-1/+81
| |
* | Merge pull request #4541 from ElDeveloper/issue-2367Charles Harris2014-03-262-10/+86
|\ \ | | | | | | BUG:change formatting of assert_array_almost_equal
| * | TST: Change tests to look at array formatting onlyYoshiki Vázquez Baeza2014-03-251-7/+9
| | | | | | | | | | | | | | | | | | The tests were looking at the formatting of other elements in the string which is not relevant for the things testsed in this case. By looking only at the array formatting, we guarantee consistency across systems.
| * | TST: Remove test that makes no senseYoshiki Vázquez Baeza2014-03-251-12/+0
| | | | | | | | | | | | | | | It's silly to check scalars when their string representations will vary so much from system to system.
| * | BUG: Fix non-compatible py3 propertyYoshiki Vázquez Baeza2014-03-251-3/+3
| | |
| * | TST: Add exception message formatting testsYoshiki Vázquez Baeza2014-03-251-0/+35
| | | | | | | | | | | | | | | | | | assert_approx_equal & assert_almost_equal make internal use of build_err_msg so a few tests have been added to check that the errors are formatted correctly.
| * | ENH: Add check for ndarray/scalar in build_err_msgYoshiki Vázquez Baeza2014-03-251-2/+10
| | | | | | | | | | | | | | | This check is needed now that build_err_msg takes a precision argument, which is only relevant if the things being compared are ndarrays.
| * | TST: Add tests for build_err_msgYoshiki Vázquez Baeza2014-03-241-0/+43
| | |
| * | BUG:change formatting of assert_array_almost_equalYoshiki Vázquez Baeza2014-03-241-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | assert_array_almost_equal now prints the number of digits that were being compared in the test instead of always printing 8 (the default for array_repr). This would lead to uninformattive error messages. Fixes #2367
* | | Merge pull request #4544 from juliantaylor/unaligned-indexCharles Harris2014-03-263-8/+39
|\ \ \ | | | | | | | | BUG: fix unaligned access of new indexing
| * | | BUG: fix unaligned access of new indexingJulian Taylor2014-03-253-8/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Requires 16 bytes alignment from string and flexible dtypes, as processing functions might access them on the itemsize which can be larger than 1 byte (e.g. 8 bytes strings) 16 byte the largest alignment required for all numpy copy loops. Closes gh-4314
* | | | Merge pull request #4509 from jaimefrio/twodim-speedupJulian Taylor2014-03-262-26/+80
|\ \ \ \ | | | | | | | | | | ENH: speed-up of triangular matrix functions
| * | | | ENH: speed-up of triangular matrix functionsjaimefrio2014-03-252-26/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * `np.tri` now produces less intermediate arrays. Runs about 40% faster for general dtypes, up to 3x faster for boolean arrays. * `np.tril` now does smarter type conversions (thanks Julian!), and together with the improvements in `np.tri` now runs about 30% faster. `np.triu` runs almost 2x faster than before, but still runs 20% slower than `np.tril`, which is an improvement over the 50% difference before. * `np.triu_indices` and `np.tril_indices` do not call `np.mask_indices`, instead they call `np.where` directly on a boolean array created with `np.tri`. They now run roughly 2x faster. * Removed the constraint for the array to be square in calls to `np.triu_indices`, `np.tril_indices`, `np.triu_indices_from` and `np.tril_indices_from`.
* | | | | DOC: partition doesn't have three algorithms (yet)Lars Buitinck2014-03-261-1/+1
| | | | |
* | | | | Merge pull request #4549 from juliantaylor/datetime-test-fixJulian Taylor2014-03-251-1/+1
|\ \ \ \ \ | | | | | | | | | | | | TST: increase test time to avoid negative times on UTC conversion
| * | | | | TST: increase test time to avoid negative times on UTC conversionJulian Taylor2014-03-251-1/+1
| | |_|_|/ | |/| | | | | | | | | | | | | | | | | | fixes the test on windows where mingw _mktemp64 will return an error instead of a negative time.
* | | | | ENH: optimize count_boolean_trues further via unrollingJulian Taylor2014-03-251-15/+25
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | redoing the computation if the booleans do not not contain 0 or 1 allows sharing registers for the addition and or operations so we can more aggressively unroll the loop to save 3 multiplies and shifts. Also it allows better pipelining of integer operations. Improvements range from 10%-50% on a range of amd64 cpus.
* | | | Merge pull request #4547 from tecki/masterCharles Harris2014-03-253-0/+83
|\ \ \ \ | | | | | | | | | | add support for python ABCs
| * | | | ENH: add numerator and denominator to integersMartin Teichmann2014-03-251-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | numbers.Integral types are supposed to have a numerator and denominator attribute. This adds those two trivial attributes.
| * | | | ENH: add support for python ABCsMartin Teichmann2014-03-252-0/+52
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Beginning with version 2.6, python supports abstract base classes, which contain a class hierarchy for numbers. This class hierarchy is very similar to the one of numpy, so it is very easy to register the numpy type hierarchy with the python type hierarchy. This patch adds those registrations and also adds unit tests for it.
* | | | MAINT: fix unused variable warningLars Buitinck2014-03-251-23/+35
|/ / /
* | | Merge pull request #4545 from charris/style-fixJulian Taylor2014-03-251-4/+8
|\ \ \ | | | | | | | | STY: Fix some multiline C comments in npy_3kcompat.h.
| * | | STY: Fix some multiline C comments in npy_3kcompat.h.Charles Harris2014-03-241-4/+8
| | | |
* | | | Merge pull request #4358 from seberg/fast-selectCharles Harris2014-03-243-49/+130
|\ \ \ \ | |_|_|/ |/| | | ENH: Speed improvements and deprecations for np.select
| * | | ENH: Speed improvements and deprecations for np.selectSebastian Berg2014-03-233-49/+130
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The idea for this (and some of the code) originally comes from Graeme B Bell (gh-3537). Choose is not as fast and pretty limited, so an iterative copyto is used instead. Closes gh-3259, gh-3537, gh-3551, and gh-3254
* | | | BUG: nditer: Initialize buffer reduce posSebastian Berg2014-03-233-10/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The FirstVisit function uses this, but when the reduction is over a single element it isn't considered a reduction. This is fine, however the reduce pos must still be initialized to 0 in that case. Also changes the check order so that it is not necessary to initialize the outerstrides as well. See also gh-4134, and gh-4535.
* | | | Merge pull request #4071 from endolith/patch-1Charles Harris2014-03-232-0/+4
|\ \ \ \ | | | | | | | | | | DOC: Link convolve with polymul
| * | | | DOC: Link convolve with polymulendolith2014-03-222-0/+4
| | | | | | | | | | | | | | | | | | | | Matlab uses `conv` for both convolution and polynomial multiplication. Clarifying that numpy has functions for each.
* | | | | BUG: fix uninitialized use of size 1 reductionsJulian Taylor2014-03-232-0/+9
| |_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | Size 1 reductions do not intiialize the iterator fully as normal reductions which triggers uninitialized use in NpyIter_IsFirstVisit. To fix this check the size of the iterator and return true if it only has size 1.
* | | | Merge pull request #4533 from charris/redo-gh-4529-commit-messageCharles Harris2014-03-222-1/+4
|\ \ \ \ | | | | | | | | | | BUG: fix broken operand initialization for einsum.
| * | | | BUG: fix broken operand initialization for einsum.Jez Ng2014-03-222-1/+4
| | | | | | | | | | | | | | | | | | | | Closes #4528.
* | | | | Merge pull request #4512 from juliantaylor/opt-srcstride0-copyCharles Harris2014-03-223-1/+11
|\ \ \ \ \ | |/ / / / |/| | | | ENH: optimize srcstride0 copy with O3
| * | | | ENH: optimize srcstride0 copy with O3Julian Taylor2014-03-183-1/+11
| | | | | | | | | | | | | | | | | | | | enables autovectorization with gcc and improves performance by about 25% for cached data.
* | | | | Merge pull request #4490 from charris/fix-random-multivariate-normalCharles Harris2014-03-223-7251/+7163
|\ \ \ \ \ | | | | | | | | | | | | Fix random multivariate normal
| * | | | | TST: Add some tests for random.multivariate_normal.Charles Harris2014-03-221-10/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Explicitly Test that the default shape does not raise a DeprecationWarning. Check that a covariance matrix that is not positive-semidefinite raises a RuntimeWarning.
| * | | | | ENH, MAINT: Check that covariance is positive-semidefinite.Charles Harris2014-03-222-7241/+7140
| | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | numpy.random.multivariate_normal uses SVD to obtain the covariance square root, but the result will be incorrect if the covariance is not positive-semidefinite and no warning will be given. However, a check can be made even while using the SVD by checking if the rows of u.T and v have the same sign, where u and v are given by u, d, v = svd(a). A deprecation warning is also fixed. When the default size was used an empty list was passed to multiply.reduce, which resulted in a default float 1. for a shape index. That is no longer legal. The problem is fixed by using an array reshape, which also avoids potential overflow in the original computation. Closes #4489.
* | | | | FIX: items/keys iterators in 3k, list wrappingPontus Stenetorp2014-03-201-2/+2
|/ / / /
* | | | BUG: catch overflow of nominator in datetime conversionsJulian Taylor2014-03-192-1/+10
| | | | | | | | | | | | | | | | closes gh-4486
* | | | TST: add unittest for byte_boundsOlivier Grisel2014-03-191-0/+9
| | | |
* | | | FIX: missing asarray import in numpy.libs.utilsOlivier Grisel2014-03-191-1/+1
| | | |
* | | | Merge pull request #4387 from abergeron/get_infoCharles Harris2014-03-183-9/+9
|\ \ \ \ | |/ / / |/| | | ENH: Make output of get_atlas_info conditional on system_info.verbosity
| * | | ENH: Make output of get_atlas_info conditional on system_info.verbosityArnaud Bergeron2014-02-273-9/+9
| | | |
* | | | Merge pull request #4507 from juliantaylor/test-addJulian Taylor2014-03-182-0/+18
|\ \ \ \ | | | | | | | | | | TST: add some more tests
| * | | | TST: add some more testsJulian Taylor2014-03-172-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | test for gh-4494 test median returns array scalars and works with object arrays
* | | | | Merge pull request #4503 from rproepp/3504-quantitiesnjsmith2014-03-182-3/+36
|\ \ \ \ \ | |/ / / / |/| | | | Fix linspace for use with physical quantities
| * | | | BUG: Fix linspace for use with physical quantitiesRobert Pröpper2014-03-182-3/+36
| | |_|/ | |/| | | | | | | | | | The fix for issue 3504 led to errors when using linspace with the quantities package. Multiplying with 1 instead of adding 0 prevents issues when using physical quantities.
* | | | Merge pull request #4494 from embray/astropy-1987Julian Taylor2014-03-171-0/+1
|\ \ \ \ | | | | | | | | | | BUG: Adds missing Py_INCREF in array_boolean_subscript
| * | | | Remove excessive spacingErik M. Bray2014-03-141-1/+0
| | | | |