| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Patch is due to Christolph Gohlke.
|
|\
| |
| |
| |
| | |
* gradient:
ENH: Improve accuracy of numpy.gradient at edges
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* 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.
|
|/
|
|
| |
wrong structure makes VC9 fail to compile under python3
|
|\
| |
| | |
BUG: fix windows fpu flag check for mixed x87 and sse instructions
|
| |
| |
| |
| |
| |
| | |
windows enables sse intrinsics also on 32 bit by default so we need to
check both the x87 and sse fpu flags.
closes #3680
|
|\ \
| | |
| | | |
STY: Make numpy/polynomial/tests/*.py PEP8 compliant.
|
| | |
| | |
| | |
| | | |
Run autopep8 on the tests and fixup the results.
|
|\ \ \
| | | |
| | | | |
Ufunc Overrides
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
|\ \ \ \
| |_|_|/
|/| | | |
BLD: Allow easy use of openblas.
|
| | | | |
|
| | | | |
|
|\ \ \ \
| | | | |
| | | | | |
BUG: Set __hash__ = None for non-hashable classes.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
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.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
BUG: PyArray_PyIntAsIntp had variable size check wrong way around.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
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.
|
| | |_|_|/
| |/| | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
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
|
| |\ \ \ \
| | | | | |
| | | | | | |
ENH: Avoiding conversion of integer to NumPy Scalar.
|
| | | | | | |
|
| | | | | | |
|
| | | | | | |
|
| | | | | | |
|
| | | | | | |
|
| | |/ / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
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.
|
|/ / / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Run autopep8 over the test files in numpy/lib/test and make fixes
to the result.
Also remove Python5 workaround.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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.
|
| |_|/
|/| |
| | |
| | |
| | |
| | | |
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.
|
| | |
| | |
| | |
| | |
| | | |
count_nonzero already has a fastpath but nonzero does not.
Improves performance by about 25% via avoiding a function call.
|
|\ \ \
| | | |
| | | | |
DOC: hfft/ihfft description conflicts with itself
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | | |
outputs
|
| | |/
| |/|
| | | |
Says Hermite spectrum when it means signal
|
|\ \ \
| | | |
| | | | |
FIX: unchecked mallocs and various other things
|
| | | | |
|
| | | |
| | | |
| | | |
| | | | |
Introduced a helper function to get rid of repetitive code.
|
| | | | |
|
| | |/
| |/|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
|\ \ \
| |/ /
|/| | |
Small correction in the docstring of polyfit.
|
| | |
| | |
| | |
| | | |
the notes were wrong in the order of the index for p.
|
| | |
| | |
| | |
| | | |
Makes the build complete with fewer warnings.
|
|/ /
| |
| |
| |
| |
| | |
assign_reduce_identity_{zero,one} were treated as
PyArray_AssignReduceIdentityFunc, but that type has
an extra void* argument. Added the argument.
|
|\ \
| | |
| | | |
ENH: Added test cases to ensure the behavior of integer as it is.
|