summaryrefslogtreecommitdiff
path: root/numpy/core
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #3534 from charris/nan-stat-functionsCharles Harris2013-08-155-61/+260
|\ | | | | Add nanmean, nanvar, and nanstd functions.
| * BUG: Regression test needs to ignore ComplexWarning.Charles Harris2013-08-121-8/+11
| | | | | | | | This was raising a warning during tests.
| * TST: Add more extensive tests for the mean, var, and std methods.Charles Harris2013-08-122-1/+173
| | | | | | | | | | | | | | | | Test the mean, var, and std methods more extensively. In addition, add tests that: Check that scalar return types ar what they should be. Check that ValueError is raised when ddof is too big.
| * ENH: Make var and std methods raise error when ddof too big.Charles Harris2013-08-121-23/+29
| | | | | | | | | | Currently the results may be infinite or negative. Instead, raise a ValueError in this case.
| * BUG: Make mean, sum, var, std methods return correct scalar type.Charles Harris2013-08-121-10/+10
| | | | | | | | | | The return type could differ depending on whether or not the value was a scalar.
| * MAINT: Clean up core/_methods.py and core/fromnumeric.pyCharles Harris2013-08-122-17/+15
| | | | | | | | | | | | | | | | Use issubclass instead of issubdtype. Add some blank lines. Remove trailing whitespace. Remove uneeded float casts since true_divide is default. Clean up documentation a bit.
| * MAINT: Separate nan functions into their own module.Charles Harris2013-08-123-453/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | New files lib/nanfunctions.py and lib/tests/test_nanfunctions.py are added and both the previous and new nan functions and tests are moved into them. The existing nan functions moved from lib/function_base are: nansum, nanmin, nanmax, nanargmin, nanargmax The added nan functions moved from core/numeric are: nanmean, nanvar, nanstd
| * TST: Added tests for nanmean(), nanvar(), nanstd()Benjamin Root2013-08-122-10/+134
| |
| * ENH: Adding np.nanmean(), np.nanstd(), np.nanvar()Benjamin Root2013-08-122-2/+340
| |
* | Merge pull request #3608 from charris/remove-1.8-diagonal-refsCharles Harris2013-08-152-3/+3
|\ \ | | | | | | DOC: Remove references to diagonal changes in 1.8.
| * | DOC: Remove references to diagonal changes in 1.8.Charles Harris2013-08-122-3/+3
| | | | | | | | | | | | | | | | | | | | | Not happening. Also remove reference to selecting multiple fields out of an array returning a view from 1.8.0 release notes. Closes #3228.
* | | Merge pull request #3619 from charris/update-ABI-version-and-hashRalf Gommers2013-08-144-3/+11
|\ \ \ | | | | | | | | Update abi version and hash
| * | | MAINT: Update API version and API hash.Charles Harris2013-08-143-1/+9
| | | | | | | | | | | | | | | | | | | | In preparation for the 1.8 release, update the API version to 0x00000009 and the API hash to f99a02b75bd60205d1afe1eed080fd53.
| * | | BUG: Replace relative imports in cversions.py.Charles Harris2013-08-141-2/+2
| | |/ | |/| | | | | | | | | | Scripts should not use relative imports as they won't work in a non-package environment.
* | | DOC fix legacy a.size() -> a.size in np.ravel docstringjnothman2013-08-131-1/+1
|/ /
* | BUG: Fix additional zero-sized index case for ufunc.reduceatMark Wiebe2013-08-121-11/+27
| |
* | TST: Add test for additional ufunc.reduceat empty parameter caseMark Wiebe2013-08-121-0/+8
| |
* | TST: Change reduceat empty test to use i4 indicesMark Wiebe2013-08-121-1/+1
| | | | | | | | | | | | | | On 32-bit platforms, was failing in casting the test i8 index to i4. It may be desirable to allow this in reduceat, but that change is independent of this pull request.
* | BUG: Fix ufunc.reduceat regression with empty index (gh-2892)Mark Wiebe2013-08-121-2/+15
| |
* | TST: Add test for reduceat ufunc regression on zero-sized arrayMark Wiebe2013-08-121-0/+7
| |
* | Merge pull request #3609 from mwiebe/fill_struct_from_tupleCharles Harris2013-08-122-1/+16
|\ \ | | | | | | Bugfix: Regression when filling struct from tuple
| * | BUG: Fix to allow x.fill(tuple) where x is a struct arrayMark Wiebe2013-08-121-1/+8
| | |
| * | TST: Test for x.fill(tuple) where x is a struct arrayMark Wiebe2013-08-121-0/+8
| |/
* | BLD: Fix build on MSVC (no uint64_t, use npy_uint64)Mark Wiebe2013-08-121-4/+4
|/
* Merge pull request #3607 from stefanv/select_doc_typosCharles Harris2013-08-121-2/+2
|\ | | | | DOC: Fix small typos in partition docstring.
| * DOC: Fix small typos in partition docstring.Stefan van der Walt2013-08-121-2/+2
| |
* | BUG: Fix typo in core bento file.Stefan van der Walt2013-08-121-2/+2
|/
* Merge pull request #3360 from juliantaylor/selection-algoCharles Harris2013-08-1212-23/+2177
|\ | | | | add quickselect algorithm and expose it via partition
| * ENH: add quickselect algorithm and expose it via partitionJulian Taylor2013-08-1212-23/+2177
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A partition sorts the kth element into its sorted order and moves all smaller elements before the kth element and all equal or greater elements behind it. The ordering of all elements in the partitions is undefined. It is implemented via the introselection algorithm which has worst case linear complexity compared to a full sort that has linearithmic complexity. The introselect algorithm uses a quickselect with median of three pivot and falls back to a quickselect with median of median of five pivot if no sufficient progress is made. The pivots used during the search for the wanted kth element can optionally be stored and reused for further partitionings of the array. This is used by the python interface if an array of kth is provided to the partitions function. This improves the performance of median and which need to select two elements if the size of the array is even. A percentile function interpolating between values also profits from this. String selection is implemented in terms of quicksort which has the same properties as a selection for now.
* | BUG: Fix variable declaration after statement.Charles Harris2013-08-113-71/+72
|/ | | | | | | | Some declarations that are not at the beginning of a block have slipped into the code. This breaks compilation on Python3.4a1. The Numpy coding standard also disallows that construct. Closes #3598.
* Merge pull request #3599 from charris/fix-operand-flags-testCharles Harris2013-08-111-4/+5
|\ | | | | BUG: Fix test_operand_flags test.
| * BUG: Fix test_operand_flags test.Charles Harris2013-08-111-4/+5
| | | | | | | | | | | | | | | | The test tests an inner loop in operand_flag_tests.c.src that expects a long type, but it is tested using 'i8'. This fails when long is not 'i8'. Closes #3363.
* | Merge pull request #3594 from juliantaylor/is_aligned_maintCharles Harris2013-08-115-24/+56
|\ \ | | | | | | MAINT: move npy_is_aligned to common.h
| * | ENH: add NPY_LIKELY and NPY_UNLIKELY macros for branching hintsJulian Taylor2013-08-093-3/+28
| | | | | | | | | | | | | | | | | | Use it for npy_is_aligned expecting alignments of the power of two. Cuts down the time spent in _IsAligned by the testsuite relative to the rest of multiarray.so from 0.6% to 0.4%
| * | MAINT: move npy_is_aligned to common.hJulian Taylor2013-08-093-24/+31
| | | | | | | | | | | | | | | | | | also make it and some other alignment operators a bit faster by using unsigned integers and bitwise and if possible. Make use of npy_is_aligned in _IsAligned too.
* | | TST: Add regression test to check numpy.int_ inheritance on Py2/Py3Yury V. Zaytsev2013-08-102-0/+45
| | | | | | | | | | | | Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
* | | BUG: Fix PyType_FastSubclass() check for numpy.int_Yury V. Zaytsev2013-08-101-9/+24
| |/ |/| | | | | Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
* | ENH: improve numpy.all()/any()Julian Taylor2013-08-093-3/+57
|/ | | | | | | | | | | | Unroll the loop once and use pminub/pmaxub to save a slow pmovmskb instruction. Improves performance by 50% on some AMD chips. Also add a pure libc path using memcmp and memchr for non amd64 systems. The libc path can be faster with a very modern cpu and libc version, e.g. an i7 with glibc 2.17 is about 20% faster than our code but many other tested platforms are much slower (2.12 xeon, core2duo) or same speed (2.17 phenom). The numpy code can be removed in future when faster libc versions and cpus are more commonly available.
* Merge pull request #3521 from arinkverma/gsoc_performanceCharles Harris2013-08-052-2/+4
|\ | | | | ENH: Avoiding NPY_BEGIN_THREADS for small arrays can speed-up trivial_three_operand_loop by 5%
| * ENH: For smaller array, added macro NPY_BEGIN_THREADS_THRESHOLDED in ↵Arink Verma2013-08-052-2/+4
| | | | | | | | | | | | | | ndarraytypes.h Avoiding NPY_BEGIN_THREADS for small arrays, can speed-up trivial_three_operand_loop by 5%. As releases of GIL, then quickly restoring just after small operation doesn't benefit.
* | BUG: Boolean assignment allowed writing to 0-sized arraySebastian Berg2013-08-052-8/+19
| | | | | | | | | | | | | | | | | | This was because of the assumption that broadcasting works if the dimension is not > 1, but correct is != 1. Adepted from a patch provided by prossahl. Closes gh-3458.
* | Merge pull request #3527 from dmuellner/masterCharles Harris2013-08-013-17/+41
|\ \ | | | | | | Fix for the NumPy C-API deprecation mechanism.
| * | More tiny changes according to Charles Harris' comments.dmuellner2013-08-011-5/+10
| | |
| * | Reflect file name change in setup.py.dmuellner2013-07-291-1/+1
| | |
| * | Fixed typo.dmuellner2013-07-291-2/+2
| | |
| * | Changes according to Charles Harris' comments.dmuellner2013-07-292-45/+35
| | |
| * | Changes according to Charles Harris' comments.dmuellner2013-07-291-0/+0
| | |
| * | Fix for the NumPy C-API deprecation mechanism.Daniel2013-07-171-4/+33
| | |
* | | DOC: np.char.startswith checks a prefix, not a suffixLars Buitinck2013-08-011-1/+1
| | |
* | | Merge pull request #2941 from raulcota/avoid_create-kill_npscalarsCharles Harris2013-07-291-4/+61
|\ \ \ | | | | | | | | Avoid conversion to NumPy Scalar