summaryrefslogtreecommitdiff
path: root/numpy
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #4022 from bbudescu/win-home-envvarCharles Harris2013-11-081-1/+1
|\ | | | | cross-platform code to find home folder when looking .numpy-site.cfg
| * cross-platform code to find numpy configbbudescu2013-11-071-1/+1
| | | | | | | | https://github.com/numpy/numpy/issues/3995
* | BUG: Fix raising exception on invalid assignment from sequenceeltjpm2013-11-082-1/+8
| | | | | | | | Closes gh-4024
* | BUG: Support ndim=0 when constructing arrays from bufferAlexander Belopolsky2013-11-082-5/+21
|/ | | | | | | Previously the buffer was interpreted as 1-dimensional when no shape was provided, even when ndim was 0. Closes gh-4015
* Merge pull request #3974 from juliantaylor/fenv-improveCharles Harris2013-11-066-141/+183
|\ | | | | ENH: avoid expensive clears in fenv functions
| * ENH: avoid expensive clears in fenv functionsJulian Taylor2013-11-066-141/+183
| | | | | | | | | | | | | | | | | | | | Clearing is 50-100 times more expensive than checking on x86, so check if there is anything needs to be cleared first. This speeds up scalar operations by 10%-20%. Based on Arink Verma code in #3739. Implement the functions as new C-API functions npy_get_floatstatus and npy_clear_floatstatus in npy_math.
* | ENH: early return from PyArray_EquivTypenums if the numbers are equalJulian Taylor2013-11-051-0/+4
| |
* | MAINT: remove unused variableJulian Taylor2013-11-041-1/+0
| |
* | ENH: replace PyUFunc_GetPyValues with faster _get_bufsize_errmaskJulian Taylor2013-11-041-20/+6
| | | | | | | | avoids unnecessary creation of unused error objects.
* | ENH: replace Py_BuildValue with faster PyTuple_PackJulian Taylor2013-11-041-1/+1
| |
* | MAINT: lib: Use a consistent PEP8-compliant import style in twodim_base.py ↵Warren Weckesser2013-11-022-10/+16
| | | | | | | | and tests/test_twodim_base.py. Also make a couple more PEP8 tweaks.
* | MAINT: lib: Add a 'See Also' section to the vander docstring, and make a few ↵Warren Weckesser2013-11-021-3/+7
| | | | | | | | more PEP8 tweaks.
* | MAINT: lib: remove unused imports and PEP8 clean up in twodim_base.pyWarren Weckesser2013-11-021-7/+18
| |
* | ENH: lib: Rewrite vander: make it faster, and add an option to specify the ↵Warren Weckesser2013-11-022-15/+69
| | | | | | | | order of the powers (either decreasing or increasing).
* | MAINT: Don't use 'import *' in lib/test_twodim_base.py.Warren Weckesser2013-11-021-1/+3
| |
* | Merge pull request #3992 from ewmoore/winhypotJulian Taylor2013-10-302-7/+11
|\ \ | | | | | | BUG: hypot(inf, 0) shouldn't raise a warning
| * | BUG: fix handling of infs in hypot on windowsEric Moore2013-10-292-7/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On any platform where we used our own implementation of hypot, (e.g. windows) there were several issues with infs. hypot(inf, y) == inf, for all y including nan. We now check for inf and handle this case explicitly for all y instead of just y = nan. Although hypot(inf, 0) was correctly returning inf, it was incorrectly raising the invalid floating point exception. Fixes gh-2385
* | | MAINT: Refactor eigh and eigvalsh and associated tests.Charles Harris2013-10-262-47/+56
| | | | | | | | | | | | | | | | | | Do not convert the UPLO argument to a bytestring, it is not necessary. Distribute parts of the eigh tests into the appropriate TestEigvalsh or TestEigh test class.
* | | Merge pull request #3978 from juliantaylor/py3-eigh-bugCharles Harris2013-10-252-5/+57
|\ \ \ | | | | | | | | BUG: fix broken UPLO of eigh in python3
| * | | BUG: reject invalid UPLO with ValueError in eigh/eigvalshJulian Taylor2013-10-252-5/+35
| | | | | | | | | | | | | | | | to prevent unintentional use of wrong function. Restores 1.7 behavior.
| * | | BUG: fix broken UPLO of eigh in python3Julian Taylor2013-10-252-4/+26
| | | | | | | | | | | | | | | | | | | | | | | | UPLO was cast to bytes and compared to a string which is always false in python3. closes gh-3977
* | | | Merge pull request #3969 from juliantaylor/memchr-bug2Charles Harris2013-10-253-30/+25
|\ \ \ \ | |/ / / |/| | | BUG: fix handling of negative strides in npy_memchr
| * | | MAINT: remove trailing zero count path in npy_memchrJulian Taylor2013-10-252-10/+8
| | | | | | | | | | | | | | | | | | | | its only actually faster than just running through the trailing bytewise loop if the needle is in the last byte.
| * | | BUG: fix handling of negative strides in npy_memchrJulian Taylor2013-10-232-22/+19
| | | | | | | | | | | | | | | | | | | | the new code did not account for them at all, add the old loops back but keep the stride 1 optimization for sparse masks.
* | | | Merge pull request #3965 from seberg/valgrindCharles Harris2013-10-2410-35/+61
|\ \ \ \ | |_|_|/ |/| | | MAINT: Initialize strides in NpyIter and silence valgrind
| * | | TST: Initialize some arrays to to avoid valgrind warningsSebastian Berg2013-10-242-2/+2
| | | |
| * | | BUG: Further reference count issues in __int__ and friendsSebastian Berg2013-10-241-0/+15
| | | |
| * | | BUG: Fix clongdouble type in scalar type selectionSebastian Berg2013-10-241-1/+1
| | | |
| * | | MAINT|BUG: Some small refcounting fixesSebastian Berg2013-10-244-23/+32
| | | |
| * | | BUG|MAINT: Fix reference count bugs, init NpyIter stridesSebastian Berg2013-10-244-9/+11
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | Also changes some tests to not use np.empty as to avoid valgrind spam. The NpyIter strides are arbitrary, but 0 makes sense, and the strides are used to decide which transfer function to use, etc. causing lots of warnings in valgrind.
* | | crackfortran: changed string.lowercase to string.ascii_lowercaseochoadavid2013-10-241-1/+1
| | | | | | | | | Compatibility with Python3, which dosn't have string.lowercase.
* | | ENH: keep order in np.sort and np.partition copyJulian Taylor2013-10-231-2/+2
| |/ |/| | | | | avoids unnecessary strided to contig copy for fortran arrays.
* | ENH: merge UFUNC_ERR_DEFAULT2 variable into UFUNC_ERR_DEFAULTJulian Taylor2013-10-224-6/+21
| | | | | | | | | | | | | | | | | | It seems it was added as a precaution to avoid breaking the rather complicated ufunc code. It effectively disabled the skipping of the dictionary lookup for the default values for the common case and leading to hardly tested code in third party libraries like pandas which set the error state to numpys old default (ignore all). The skipping improves scalar performance by 2.5-5%.
* | BUG: fix crash on default errobjJulian Taylor2013-10-221-3/+10
|/ | | | | | Missing check for optional NULL argument, the case can only happen if the error mask is 0 (the old default). closes gh-3962
* Merge pull request #3952 from JStech/issue_2052seberg2013-10-212-0/+10
|\ | | | | BUG: #2052 del scalar subscript causes segfault
| * BUG: #2052 del scalar subscript causes segfaultJohn Stechschulte2013-10-202-0/+10
| | | | | | | | | | | | | | | | Fixes issue #2052, where attempting to delete a scalar field causes a segfault. Returns ValueError instead, like when attempting to delete an array element. Also added a test for this bug.
* | Merge pull request #3954 from juliantaylor/memchr-bugCharles Harris2013-10-201-1/+1
|\ \ | | | | | | BUG: wrong boundary check in unrolled memchr
| * | BUG: wrong boundary check in unrolled memchrJulian Taylor2013-10-201-1/+1
| | |
* | | MAINT: io: handle a bad fmt argument in savetxt by raising a ValueError.Warren Weckesser2013-10-202-0/+6
|/ /
* | Merge pull request #3856 from pv/op-before-ufuncCharles Harris2013-10-194-3/+294
|\ \ | | | | | | BUG: core: ensure __r*__ has precedence over __numpy_ufunc__
| * | BUG: core: ensure __r*__ has precedence over __numpy_ufunc__Pauli Virtanen2013-10-194-3/+294
| |/ | | | | | | | | | | | | | | | | | | | | | | | | Add a special case to the implementation of ndarray.__mul__ et al. that refuses to work on other objects that are not ndarray subclasses and implement both __numpy_ufunc__ and __r*__. This way, execution passes first to the custom __r*__ method, which makes it possible to have e.g. __mul__ and np.multiply do different things. Additionally, disable one __array_priority__ special case handling when also __numpy_ufunc__ is defined.
* | Merge pull request #3921 from mdickinson/doc-numpy-random-fixesCharles Harris2013-10-191-2/+2
|\ \ | | | | | | DOC: Fix misleading description of random_sample in numpy.random docstring.
| * | DOC: Fix misleading description of random_sample in numpy.random docstring.Mark Dickinson2013-10-151-2/+2
| | |
* | | ENH: Add scalar special cases to Priority getterSebastian Berg2013-10-191-0/+7
| | | | | | | | | | | | | | | | | | Exact Python scalars can never have a priority, but checking it is expensive. This adds checks for these to the Priority getter function.
* | | Merge pull request #3946 from juliantaylor/pyufunc_refactorCharles Harris2013-10-192-105/+206
|\ \ \ | | | | | | | | delay error object creation to when errors occur
| * | | MAINT: refactor ufunc error object handlingJulian Taylor2013-10-192-72/+143
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | _get_global_ext_obj: retrieves global ufunc object _get_bufsize_errmask: get only bufsize and errormask from ufunc object _extract_pyvals: handle NULL extobj PyUFunc_GetPyValues implemented as _get_global_ext_obj +_extract_pyvals drop unused first_error variable. fix errobj memory leak in previous commit. add some test for the extobj and warning path, the warning tests are disabled like the raising path as they fail on a bunch of platforms.
| * | | ENH: High time consumption by PyUFunc_GetPyValues in ufunc_object.cArink Verma2013-10-191-56/+86
| | | | | | | | | | | | | | | | | | | | | | | | For every single operation calls, numpy has to extract value of buffersize, errormask and name to pack and build error object. These two functions, _extract_pyvals and PyUFunc_GetPyValues together use >12% of time.
* | | | ENH: accept callable as message in assert_Julian Taylor2013-10-192-5/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Allows deferring evaluation until failure. Used for blocked minmax test which evaluate array representations for the error message many thousand times accumulating to a full second useless runtime.
* | | | ENH: unroll vector minmax loopJulian Taylor2013-10-191-26/+22
|/ / / | | | | | | | | | | | | | | | | | | Improves speed by 10% on intel cpus. Simplify code by moving the fenv support check into the dispatcher. fenv works on all common platforms (including windows), the fallback is not worth it for the exotic platforms where it might not be available.
* | | MAINT: fix item_selection.c so it compiles without warningsLars Buitinck2013-10-191-12/+12
| | |