| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| | |
BUG: Fix structured_to_unstructured on single-field types
|
| | |
|
| |\ |
|
| | |
| | |
| | |
| | |
| | |
| | | |
Previously a single-field type would decay, which is undesirable.
The included test previously did not pass
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* ENH: Added shape argument to *_like() array creation functions
* ENH: C backend adjustments for shape argument on *_like()
* TST: Added test for shape argument in *_like() functions
* ENH: Added PyArray_NewLikeArrayWithShape()
This change maintains backwards compatibility, rather than passing new
arguments to PyArray_NewLikeArray().
* BUG: Fix for PyArray_NewLikeArrayWithShape strides and ndim == 0
Arrays created with new shapes should not take into consideration the original
array's stride, and ndim == 0 should not be a case to ignore a new shape, as
the caller may request a 0d array.
* REL: Updates for C-API, version 1.17.x
* Add comments to cversions.txt (new PyArray_NewLikeArrayWithShape function)
* Increment C_API_VERSION to 1.17 in setup_common.py
* Revert "REL: Updates for C-API, version 1.17.x"
This reverts commit 807f512ebeb7797ad374d845e41015948afcc708.
* Revert exposing PyArray_NewLikeArrayWithShape on C-API
* DOC: fix versionadded for *_like() shape argument
* STY: add missing spaces in array initializers
* ENH: empty_like raises ValueError
This occurs when shape is defined and number of dimensions match but
order is 'K'.
* TST: test for exception of *_like() functions
* DOC: release note for shape argument in *_like() functions
* DOC: fix *_like() documentation on raises
* BUG: *_like() raises for non-C/F-layout arrays
* TST: change *_like() shapes to prevent NPY_RELAXED_STRIDE_DEBUG=1 failure
* Move empty_like() exception to C implementation
* Update *_like() ValueError documentation
* Rearrange stride computation for *_like() if new shape and order='K'
* Change handling of order= for *_like()
- If order='K' try to keep, otherwise, order='C' is implied
- Do not raise ValueError anymore
* Fix *_like() tests
|
|\ \ \
| | | |
| | | | |
DOC: fix typos in dev/index
|
|/ / / |
|
|\ \ \
| | | |
| | | | |
DOC: reorganize developer docs, use scikit-image as a base for change
|
| | | | |
|
| | | | |
|
|\ \ \ \
| |_|_|/
|/| | | |
MAINT, DEP: Fix deprecated ``assertEquals()``
|
|/ / /
| | |
| | |
| | | |
See https://docs.python.org/2/library/unittest.html#deprecated-aliases
|
|\ \ \
| | | |
| | | | |
BUG: Some PyPy versions lack PyStructSequence_InitType2.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Define `PyStructSequence_InitType2` for those PyPy versions that
don't support it.
Closes gh-13384.
|
|\ \ \ \
| |/ / /
|/| | | |
BUG/ENH: Make floor, ceil, and trunc call the matching special methods
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Previously `np.ceil` would call `o.ceil()` on each element of an object array.
This is inconsistent with the builtin python way of handling this, calling `o.__ceil__()`.
This changes these three functions to use the corresponding functions in the `math` module, which do the special method lookup.
As a result, they now work on arrays of `Fraction` and `Decimal` objects.
|
|\ \ \ \
| | | | |
| | | | | |
DEV, BUILD: add pypy3 to azure CI
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
| | | | | |
|
|\ \ \ \ \
| | | | | |
| | | | | | |
MAINT, DOC: Post 1.16.3 release updates
|
|/ / / / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
- Add 1.16.3 release notes
- Add 1.16.3 changelog
- Update mailmap
|
|\ \ \ \ \
| | | | | |
| | | | | | |
BLD: address mingw-w64 issue. Follow-up to gh-9977
|
|/ / / / / |
|
|\ \ \ \ \
| | | | | |
| | | | | | |
DOC: Specify range for numpy.angle
|
| | | | | | |
|
|\ \ \ \ \ \
| |/ / / / /
|/| | | | | |
ENH: Use AVX for float32 implementation of np.exp & np.log
|
| | | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Added a missing NPY_HAVE_SSE2_INTRINSICS guard
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
1) use __builtin_cpu_supports("avx512f") only for gcc ver >= 5
2) Introduced two new macro's:
HAVE_ATTRIBUTE_TARGET_@ISA@_WITH_INTRINSICS for ensuring compiler can
compile functions that use intrinsics and are compiled with avx2/avx512f
attributes
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
clang6.0 fails to compile this code:
__asm__ __volatile__ (
"vpaddd %zmm1, %zmm2, %zmm3\n\t"
);
Note that this is a known issue in clang6.0. clang7.0 and gcc does not
have this problem. This fails to set the flag HAVE_LINK_AVX512F. Hence,
the AVX512F version of exp and log doesn't get built. If AVX512F is
detected during runtime, instead of choosing to run the AVX2 version, it
will end up running scalar version.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
1) Got rid of @isa@_cmp_mask helper function, since clang expects the
compare operator in _mm@vsize@_cmp_ps to be a compile time constant
2) Converted all helper functions to static functions
|
|/ / / / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This commit implements vectorized single precision exponential and
natural log using AVX2 and AVX512.
Accuracy:
| Function | Max ULP Error | Max Relative Error |
|----------|---------------|--------------------|
| np.exp | 2.52 | 2.1E-07 |
| np.log | 3.83 | 2.4E-07 |
Performance:
(1) Micro-benchmarks: measured execution time of np.exp and np.log using
timeit package in python. Each function is executed 1000 times and this
is repeated 100 times. The standard deviation for all the runs was less
than 2% of their mean value and hence not included in the data. The
vectorized implementation was upto 7.6x faster than the scalar version.
| Function | NumPy1.16 | AVX2 | AVX512 | AVX2 speedup | AVX512 speedup |
| -------- | --------- | ------ | ------ | ------------ | -------------- |
| np.exp | 0.395s | 0.112s | 0.055s | 3.56x | 7.25x |
| np.log | 0.456s | 0.147s | 0.059s | 3.10x | 7.64x |
(2) Logistic regression: exp and log are heavily used in training neural
networks (as part of sigmoid activation function and loss function
respectively). This patch significantly speeds up training a logistic
regression model. As an example, we measured how much time it takes to
train a model with 15 features using 1000 training data points. We
observed a 2x speed up to train the model to achieve a loss function
error < 10E-04.
| Function | NumPy1.16 | AVX2 | AVX512 | AVX2 speedup | AVX512 speedup |
| -------------- | ---------- | ------ | ------ | ------------ | -------------- |
| logistic.train | 121.0s | 75.02s | 60.60s | 1.61x | 2.02x |
|
|\ \ \ \ \
| |_|_|/ /
|/| | | | |
ENH: preserve subclasses in ufunc.outer
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
* use an instance check to avoid
complications with the matrix subclass
* add unit test for allowing subclass
passthrough in ufunc.outer
|
| |/ / / |
|
|\ \ \ \
| | | | |
| | | | | |
ENH: Implement `np.floating.as_integer_ratio`
|
| | | | | |
|
| | | | |
| | | | |
| | | | |
| | | | | |
This matches the builtin `float.as_integer_ratio` and (in recent python versions) `int.as_integer_ratio`.
|
|\ \ \ \ \
| | | | | |
| | | | | | |
ENH: `isfinite` support for `datetime64` and `timedelta64`
|
| |\ \ \ \ \ |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
`datetime64` and `timedelta64`
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
as per code review to `noobj`
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Added test: test_datetime.TestDateTime.test_isfinite.
It just checks the reverse of test_isnat.
|
| | | | | | | |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
I am not quite sure whether this should be done somewhat more elegant
especially with the typeresolver.
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
BUG: Raise when unravel_index, ravel_multi_index are given empty input
|
| | | | | | | | |
|
| | | | | | | | |
|