summaryrefslogtreecommitdiff
path: root/numpy
Commit message (Collapse)AuthorAgeFilesLines
...
* | | 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.
* | | | Merge pull request #3575 from seberg/issue-3458Charles Harris2013-08-052-8/+19
|\ \ \ \ | | | | | | | | | | BUG: Boolean assignment allowed writing to 0-sized array
| * | | | 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.
* | | | | Fix doc typoMartin Spacek2013-08-041-1/+1
|/ / / /
* | | | BUG: Make np.insert check for out of bounds axis arguments.Félix Hartmann2013-08-022-1/+10
| | | | | | | | | | | | | | | | Also add test for IndexError exception when axis is out of bounds.
* | | | TST: add test for negative axis values in np.insert.Félix Hartmann2013-08-021-0/+7
| | | |
* | | | BUG: Fix bug in np.insert when axis=-1Félix Hartmann2013-08-021-1/+1
| | | |
* | | | 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
| * | | | Fix indentationRaul Cota2013-01-221-4/+4
| | | | |
| * | | | Avoid conversion to NumPy ScalarRaul Cota2013-01-221-4/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After profiling I noticed that a bottleneck for NumPy scalar operations occurs when trying to extract the underlying C value from a Python float because it first converts the Python scalar into its matching NumPy scalar (e.g. PyFloat -> float64) and then it extracts the C value from the NumPy scalar. For some types, it is a lot faster to just extract the value directly from the Python scalar. I only did for PyFloat in this modified code but the code is laid out such that it can be easily extended to other types such as Integers. I did not do them because I was unsure if there was a special scenario to handle across OS and/or between 32 and 64 bit platforms. The ratio of speed to do different operations are listed below (Old time / New time with modifications). In other words, the bigger the number, the bigger the speed up we get. Tested in Python 2.6 Windows RATIO TEST 1.1 Array * Array 1.1 PyFloat * Array 1.1 Float64 * Array 1.0 PyFloat + Array 1.3 Float64 + Array 1.1 PyFloat * PyFloat 1.0 Float64 * Float64 4.0 PyFloat * Float64 2.9 PyFloat * vector1[1] 3.9 PyFloat + Float64 9.8 PyFloat < Float64 9.9 PyFloat < Float64 1.0 Create array from list 1.0 Assign PyFloat to all 1.0 Assign Float64 to all 4.2 Float64 * pyFloat * pyFloat * pyFloat * pyFloat 1.0 pyFloat * pyFloat * pyFloat * pyFloat * pyFloat 1.0 Float64 * Float64 * Float64 * Float64 * Float64 1.0 Float64 ** 2 1.0 pyFloat ** 2
* | | | | Merge pull request #3559 from hklemm/patch-1Charles Harris2013-07-291-4/+3
|\ \ \ \ \ | | | | | | | | | | | | Update structured_arrays.py
| * | | | | Update structured_arrays.pyhklemm2013-07-281-4/+3
| | | | | | | | | | | | | | | | | | The behaviour documented did not match the actual behaviour of numpy. Explanation changed and the code example updated.
* | | | | | MAINT: Remove extraneous remark.Charles Harris2013-07-291-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In numpy/core/src/npymath/npy_math_private.h the /* my machine */ comment is not informative.
* | | | | | ENH: Add support for Motorola extended float formatAndreas Schwab2013-07-296-1/+49
| | | | | |
* | | | | | STY: Break long lines in numpy/distutils/log.py.Charles Harris2013-07-291-5/+16
| | | | | |
* | | | | | MAINT: typo fix in logging messageTomas Tomecek2013-07-291-2/+2
|/ / / / / | | | | | | | | | | | | | | | | | | | | The logging message in numpy.distutils.log.set_threshold mispelled threshold.
* | | | | Merge pull request #3541 from jeromekelleher/patch-1njsmith2013-07-241-1/+1
|\ \ \ \ \ | | | | | | | | | | | | BUG: make preprocessor tests consistent in halffloat.c
| * | | | | Update halffloat.cjeromekelleher2013-07-211-1/+1
| | |_|_|/ | |/| | | | | | | | Corrected preprocessor form.
* | | | | Link cumsum and diff to one another as theyre roughly the inverse of each otherNils Werner2013-07-242-1/+3
| | | | |
* | | | | Merge pull request #3538 from michaelaye/patch-1Ralf Gommers2013-07-231-1/+2
|\ \ \ \ \ | |/ / / / |/| | | | Docstring: point to correct equivalent function (one word change)
| * | | | Repaired my misunderstanding and added np.extractK.-Michael Aye2013-07-231-1/+2
| | | | | | | | | | | | | | | I overlooked that np.compress and ndarray.compress are different things and wrongly assumed that it was a typo. I corrected that and added np.extract for equivalency for 1-D arrays.
| * | | | Docstring: point to correct equivalent functionK.-Michael Aye2013-07-191-1/+1
| | | | | | | | | | | | | | | np.compress' "See also" pointed to itself instead to equivalent np.extract
* | | | | MAINT: linalg: some more clean up in norm: 'nd' was defined but not usedWarren Weckesser2013-07-201-5/+4
| | | | |
* | | | | BUG: linalg: norm was computing and then ignoring a productWarren Weckesser2013-07-191-2/+1
|/ / / /
* | | | Merge pull request #3531 from fkbreitl/masternjsmith2013-07-181-15/+45
|\ \ \ \ | | | | | | | | | | Updated documentation for histogram2d() in twodim_base.py according to discussion
| * | | | Update twodim_base.pyFrank Breitling2013-07-171-1/+1
| | | | |
| * | | | Update twodim_base.pyFrank Breitling2013-07-131-33/+44
| | | | |
| * | | | Fixed two typos.Frank B2013-02-051-2/+2
| | | | |
| * | | | Added example for 2D-histogram with variable bin size.Frank B2013-02-051-2/+21
| | | | |
* | | | | Merge pull request #3520 from charris/replace-warningmanagerRalf Gommers2013-07-1612-150/+70
|\ \ \ \ \ | | | | | | | | | | | | Replace use of WarningManager by warnings.catch_warnings and then deprecate it.
| * | | | | MAINT: Remove uses of the WarningManager class.Charles Harris2013-07-1212-150/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | WarningManager was a workaround for the lack of the with statement in Python versions < 2.6. As those versions are no longer supported it can be removed. Deprecation notes are added to WarningManager and WarningMessage, but to avoid a cascade of messages in third party apps, no warnings are raised at this time, that can be done later. Closes #3519.
* | | | | | MAINT: Fix Python version dependent test.Charles Harris2013-07-121-16/+17
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The buffer test in numpy/core/tests/test_api.py was apparently testing for incorrect behavior that was corrected in Python 2.7.5. This PR changes the test to check for the correct results and makes running it depend on Python version. Closes #3512.
* | | | | Merge pull request #3518 from charris/use-errstate-context-managerCharles Harris2013-07-1120-409/+194
|\ \ \ \ \ | | | | | | | | | | | | MAINT: Use np.errstate context manager.
| * | | | | MAINT: Use np.errstate context manager.Charles Harris2013-07-1120-409/+194
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that Python < 2.6 is no longer supported we can use the errstate context manager in places where constructs like ``` old = seterr(invalid='ignore') try: blah finally: seterr(**old) ``` were used.
* | | | | | Merge pull request #3516 from charris/remove-outdated-version-checksnjsmith2013-07-1129-317/+16
|\ \ \ \ \ \ | | | | | | | | | | | | | | MAINT: Remove outdated version checks.
| * | | | | | MAINT: Remove outdated version checks.Charles Harris2013-07-1129-317/+16
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because Numpy 1.8.0 will no longer supports Python versions < 2.6 we no longer need to check for that and can also remove the code that is specific to those earlier versions. To make this a bit safer, the toplevel setup.py file now contains a check of the Python version number and raises an error when run by an unsupported version.
* | | | | | Merge pull request #3509 from arinkverma/gsoc_performanceCharles Harris2013-07-103-14/+33
|\ \ \ \ \ \ | |/ / / / / |/| | | | / | | |_|_|/ | |/| | | ENH: added short path scalar array in get_ufunc_arguments from ufunc_object.c
| * | | | ENH: check for the same object in can_cast_scalar_to from convert_datatype.cArink Verma2013-07-101-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | Check if two dtypes references to the same object in can_cast_scalar_to from convert_datatype.c, then the result is always OK
| * | | | ENH: added check for scalar array in PyArray_FromArray from ctors.cArink Verma2013-07-101-1/+2
| | | | | | | | | | | | | | | | | | | | Check if object is of array with newtype is NULL. If so return it directly instead of checking for casting.
| * | | | ENH: added check for scalar array in PyArray_FromArray from ctors.cArink Verma2013-07-081-4/+3
| | | | | | | | | | | | | | | | | | | | Check if object is of array with newtype is NULL. If so return it directly instead of checking for casting.
| * | | | ENH: added check for scalar array in PyArray_FromArray from ctors.cArink Verma2013-07-081-2/+0
| | | | | | | | | | | | | | | | | | | | Check if object is of array dimension zero with newtype is NULL. If so return it directly instead of checking for casting.