summaryrefslogtreecommitdiff
path: root/numpy
Commit message (Collapse)AuthorAgeFilesLines
* BUG: Fix UFUNC_CHECK_STATUS to work on both 32 and 64 bit Windows.Charles Harris2013-09-071-1/+12
| | | | Patch is due to Christolph Gohlke.
* Merge branch 'gradient'Charles Harris2013-09-072-25/+86
|\ | | | | | | | | * gradient: ENH: Improve accuracy of numpy.gradient at edges
| * ENH: Improve accuracy of numpy.gradient at edgesdanieljfarrell2013-09-072-25/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * numpy.gradient has been enhanced to use a second order accurate one-sided finite difference stencil at boundary elements of the array. Second order accurate central difference are still used for the interior elements. The result is a fully second order accurate approximation of the gradient over the full domain. * The one-sided stencil uses 3 elements each with a different weight. A forward difference is used for the first element, dy/dx ~ -(3.0*y[0] - 4.0*y[1] + y[2]) / (2.0*dx) and backwards difference is used for the last element, dy/dx ~ (3.0*y[-1] - 4.0*y[-2] + y[-3]) / (2.0*dx) * Because the datetime64 datatype cannot be multiplied a view is taken of datetime64 arrays and cast to int64. The gradient algorithm is then applied to the view rather than the input array. * Previously no dimension checks were performed on the input array. Now if the array size along the differentiation axis is less than 2, a ValueError is raised which explains that more elements are needed. If the size is exactly two the function falls back to using a 2 point stencil (the old behaviour). If the size is 3 and above then the higher accuracy methods are used. * A new test has been added which validates the higher accuracy. Old tests have been updated to pass. Note, this should be expected because the boundary elements now return different (more accurate) values.
* | BUG: fix test_rational PyNumberMethods for python3Julian Taylor2013-09-071-0/+12
|/ | | | wrong structure makes VC9 fail to compile under python3
* Merge pull request #3691 from juliantaylor/windows-fpu-fixCharles Harris2013-09-061-1/+5
|\ | | | | BUG: fix windows fpu flag check for mixed x87 and sse instructions
| * BUG: fix windows fpu flag check for mixed x87 and sse instructionsJulian Taylor2013-09-061-1/+5
| | | | | | | | | | | | windows enables sse intrinsics also on 32 bit by default so we need to check both the x87 and sse fpu flags. closes #3680
* | Merge pull request #3676 from charris/pep8-polynomial-testsCharles Harris2013-09-069-523/+504
|\ \ | | | | | | STY: Make numpy/polynomial/tests/*.py PEP8 compliant.
| * | STY: Make numpy/polynomial/tests/*.py PEP8 compliant.Charles Harris2013-09-039-523/+504
| | | | | | | | | | | | Run autopep8 on the tests and fixup the results.
* | | Merge pull request #3524 from cowlicks/ufunc-overrideCharles Harris2013-09-068-4/+509
|\ \ \ | | | | | | | | Ufunc Overrides
| * | | BLD: Added ufunc_override.h to setup.py.Blake Griffith2013-09-051-1/+2
| | | |
| * | | TST: Add ufunc override tests.Blake Griffith2013-09-053-0/+217
| | | |
| * | | ENH: Add ufunc override functionality to ufuncs and dots.Blake Griffith2013-09-053-3/+95
| | | |
| * | | ENH: Add ufunc override API.Blake Griffith2013-08-311-0/+195
| | | |
* | | | Merge pull request #3642 from jseabold/openblas-installCharles Harris2013-09-051-19/+51
|\ \ \ \ | |_|_|/ |/| | | BLD: Allow easy use of openblas.
| * | | Make vecLib / Accelerate not shadow other optimized builds under OSXOlivier Grisel2013-09-041-23/+33
| | | |
| * | | Add support for using openblas for the _dotblas function.Ake Sandgren2013-08-201-1/+23
| | | |
* | | | Merge pull request #3657 from charris/add-hash-method-to-polynomialsCharles Harris2013-09-042-0/+4
|\ \ \ \ | | | | | | | | | | BUG: Set __hash__ = None for non-hashable classes.
| * | | | BUG: Set __hash__ = None for non-hashable classes.Charles Harris2013-08-282-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because neither poly1d nor the Polynomial package polynomial classes are immutable, hence not reliably hashable, they should signal that by setting __hash__ = None. This also fixes the warning Overriding __eq__ blocks inheritance of __hash__ in 3.x that is given when the command `python2.7 -3 -c"import numpy"` is run.
* | | | | Merge pull request #3678 from charris/fix-wrong-variable-typeCharles Harris2013-09-041-2/+2
|\ \ \ \ \ | | | | | | | | | | | | BUG: PyArray_PyIntAsIntp had variable size check wrong way around.
| * | | | | BUG: PyArray_PyIntAsIntp had variable size check wrong way around.Charles Harris2013-09-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This bug resulted in using a long type when a long long was required, resulting in numerous errors when numpy was compiled as 64 bits on 64 bit windows.
| * | | | | Revert "Merge pull request #3567 from arinkverma/avoid_conversion"Charles Harris2013-09-031-214/+12
| | |_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit de9f1c92d3ca0920bce915438f0406f587aa98db, reversing changes made to d958dec676beeac218a118fac084fa8b14bc9171. There is a change of behavior in conversion of signed to unsigned PyLong that shows up on my machine. For some reason this did not show up in the travisbot tests. This reverts the merge that led to this problem until it can be sorted out. Error shows up as numpy/core/arrayprint.py", line 653, in __call__ if _MININT < x < _MAXINT: OverflowError: can't convert negative int to unsigned
| * | | | Merge pull request #3567 from arinkverma/avoid_conversionCharles Harris2013-09-021-12/+214
| |\ \ \ \ | | | | | | | | | | | | ENH: Avoiding conversion of integer to NumPy Scalar.
| | * | | | Check for error value by PyLong_AsUnsignedLong as (unsigned long)-1Arink Verma2013-08-311-1/+1
| | | | | |
| | * | | | Replaced PyInt_As_Long with PyInt_AsLong and errorcheckingArink Verma2013-08-301-10/+27
| | | | | |
| | * | | | Added PyInt_CheckExact for python < 3 and error check for PyLong_AsLongArink Verma2013-08-301-21/+34
| | | | | |
| | * | | | Moved int test cases to pr#3592Arink Verma2013-08-301-28/+0
| | | | | |
| | * | | | Extracting longlong value without converting it to NyTypeArink Verma2013-08-301-4/+66
| | | | | |
| | * | | | ENH: Avoiding conversion of integer to NumPy Scalar.Arink Verma2013-08-302-13/+151
| | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | There is a bottleneck in scalar operations, when trying to extract the underlying C value from a Python integer/float. I have avoid conversion for know integer type but extracting its value.
* | | | | STY: Make numpy/lib/test/*.py PEP8 compliant.Charles Harris2013-09-0319-1086/+1246
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | Run autopep8 over the test files in numpy/lib/test and make fixes to the result. Also remove Python5 workaround.
* | | | MAINT: Make Warning handling cleaner in test_concatenate_sloppy0.Charles Harris2013-08-311-11/+4
| | | | | | | | | | | | | | | | | | | | | | | | The test in question is in numpy/core/tests/test_shape_base. The cleanup consists of using warning.catch_warnings instead of setting and popping the warnings filter.
* | | | BUG: Catch DeprecationWarning in numpy/core/tests/test_numeric.py.Charles Harris2013-08-311-28/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TestCreationFuncs.check_function was spewing Deprecation warnings in release mode. AFAICT, it did not raise errors during development because it was buried by a TypeError. The Deprecation in question is at line 1141 in multiarray/conversion_utils.c. Hiding the deprecation should be harmless here, but when the Deprecation is turned into an error it will need to be caught in the test.
* | | | BUG: Make DeprecationWarning always raise error in test.Charles Harris2013-08-311-3/+5
| |_|/ |/| | | | | | | | | | | | | | The test_fancy in numpy/lib/tests/test_function_base.py failed in release because a DeprecationWarning was no longer raised, it had become a warning.
* | | ENH: add nonzero of bools fastpathJulian Taylor2013-08-301-10/+32
| | | | | | | | | | | | | | | count_nonzero already has a fastpath but nonzero does not. Improves performance by about 25% via avoiding a function call.
* | | Merge pull request #3647 from endolith/patch-1Charles Harris2013-08-302-38/+76
|\ \ \ | | | | | | | | DOC: hfft/ihfft description conflicts with itself
| * | | DOC: Unlink non-variable 'm', use monospace insteadendolith2013-08-301-3/+3
| | | |
| * | | DOC: Remove parentheses around axisendolith2013-08-291-18/+18
| | | |
| * | | DOC: change "Hermite" to "Hermitian", "though" to "although"endolith2013-08-292-6/+6
| | | |
| * | | DOC: add note clarifying why ifftshift is neededendolith2013-08-231-1/+2
| | | |
| * | | DOC: Add examples, copy some text from rfft functions to clarify inputs and ↵endolith2013-08-221-12/+49
| | | | | | | | | | | | | | | | outputs
| * | | DOC: hfft/ihfft description conflicts with itselfendolith2013-08-211-6/+6
| | |/ | |/| | | | Says Hermite spectrum when it means signal
* | | Merge pull request #3655 from larsmans/c-fixesCharles Harris2013-08-308-63/+101
|\ \ \ | | | | | | | | FIX: unchecked mallocs and various other things
| * | | FIX don't explicitly cast void* when final type is knownLars Buitinck2013-08-303-12/+11
| | | |
| * | | FIX: some more casts in ufunc_objectLars Buitinck2013-08-301-22/+17
| | | | | | | | | | | | | | | | Introduced a helper function to get rid of repetitive code.
| * | | MAINT: remove unused goto label and useless castsLars Buitinck2013-08-302-4/+3
| | | |
| * | | FIX: unchecked mallocs and Python operationsLars Buitinck2013-08-303-25/+70
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | Rewrote _tmp_string_t handling in buffer.c to use the fact that realloc(NULL, n) is equivalent to malloc(n). There are still some unchecked cases in this file. Also changed some arguments to const and removed casts on malloc return values; malloc returns void*, which is converted to any other pointer automatically. Casting the return value of malloc is more likely to hide bugs than to fix anything.
* | | Merge pull request #3651 from MatthieuDartiailh/polyfit_docCharles Harris2013-08-291-3/+3
|\ \ \ | |/ / |/| | Small correction in the docstring of polyfit.
| * | Small correction in the docstring of polyfit. As mentionned in Issue 3640, ↵Matthieu Dartiailh2013-08-251-3/+3
| | | | | | | | | | | | the notes were wrong in the order of the index for p.
* | | FIX: remove unused variables and add castsLars Buitinck2013-08-274-6/+7
| | | | | | | | | | | | Makes the build complete with fewer warnings.
* | | FIX: wrong function types in ufunc_object.cLars Buitinck2013-08-271-6/+6
|/ / | | | | | | | | | | assign_reduce_identity_{zero,one} were treated as PyArray_AssignReduceIdentityFunc, but that type has an extra void* argument. Added the argument.
* | Merge pull request #3592 from arinkverma/int_behaviourCharles Harris2013-08-231-0/+27
|\ \ | | | | | | ENH: Added test cases to ensure the behavior of integer as it is.