summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #13134 from r-devulap/logexp-simdMatti Picus2019-04-2012-1/+591
|\ | | | | ENH: Use AVX for float32 implementation of np.exp & np.log
| * DOC: adding release notes for 1.17.0Raghuveer Devulapalli2019-04-191-0/+6
| |
| * BUG: Fixing incomplete guards for @ISA@_exp/log_FLOAT functionsRaghuveer Devulapalli2019-04-192-2/+2
| | | | | | | | Added a missing NPY_HAVE_SSE2_INTRINSICS guard
| * BUG: Adding macro HAVE_ATTRIBUTE_TARGET_@ISA@_WITH_INTRINSICSRaghuveer Devulapalli2019-04-198-8/+61
| | | | | | | | | | | | | | | | | | 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
| * BUG: Fixing AVX512F build issues on clang6.0Raghuveer Devulapalli2019-04-192-9/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * BUG: Fixing compile time error for clangRaghuveer Devulapalli2019-04-191-30/+25
| | | | | | | | | | | | | | 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
| * ENH: vectorizing float32 implementation of np.exp & np.logRaghuveer Devulapalli2019-04-198-1/+524
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 |
* Merge pull request #8662 from eric-wieser/ufunc-outer-subclassMatti Picus2019-04-192-2/+31
|\ | | | | ENH: preserve subclasses in ufunc.outer
| * MAINT: avoid np.matrix in PR 8662Tyler Reddy2019-04-172-2/+31
| | | | | | | | | | | | | | | | * use an instance check to avoid complications with the matrix subclass * add unit test for allowing subclass passthrough in ufunc.outer
| * ENH: preserve subclasses in ufunc.outerEric Wieser2019-04-161-2/+2
| |
* | Merge pull request #10741 from eric-wieser/as_integer_ratioTyler Reddy2019-04-184-0/+239
|\ \ | | | | | | ENH: Implement `np.floating.as_integer_ratio`
| * | TST: use smaller tests for PR 10741.Tyler Reddy2019-04-181-46/+76
| | |
| * | ENH: Implement `np.floating.as_integer_ratio`Eric Wieser2019-04-104-0/+209
| | | | | | | | | | | | This matches the builtin `float.as_integer_ratio` and (in recent python versions) `int.as_integer_ratio`.
* | | Merge pull request #13218 from debsankha/isfinite-datetimeCharles Harris2019-04-187-2/+67
|\ \ \ | | | | | | | | ENH: `isfinite` support for `datetime64` and `timedelta64`
| * \ \ Merge branch 'master' into isfinite-datetimeMatti Picus2019-04-1032-187/+327
| |\ \ \
| * | | | DOC: added release note for `isfinite` support forDebsankha Manik2019-04-071-0/+4
| | | | | | | | | | | | | | | | | | | | `datetime64` and `timedelta64`
| * | | | MAINT: Changed ufunc type description for `isfinite`Debsankha Manik2019-04-071-1/+1
| | | | | | | | | | | | | | | | | | | | as per code review to `noobj`
| * | | | TST: testing isfinite on datetime and timedelta objects.Debsankha Manik2019-03-301-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | Added test: test_datetime.TestDateTime.test_isfinite. It just checks the reverse of test_isnat.
| * | | | MAINT: added missing return in PyUFunc_IsFiniteTypeResolverDebsankha Manik2019-03-301-1/+1
| | | | |
| * | | | ENH: allow datettimes in isfiniteSebastian Berg2019-03-305-2/+41
| | | | | | | | | | | | | | | | | | | | | | | | | I am not quite sure whether this should be done somewhat more elegant especially with the typeresolver.
* | | | | Merge pull request #11684 from mattip/unravel_index-emptyMatti Picus2019-04-182-33/+88
|\ \ \ \ \ | | | | | | | | | | | | BUG: Raise when unravel_index, ravel_multi_index are given empty input
| * | | | | BUG: fix from reviewmattip2019-03-301-1/+1
| | | | | |
| * | | | | BUG: fixes from reviewmattip2019-03-291-45/+40
| | | | | |
| * | | | | BUG: raise on empty sequence input to unravel_index, ravel_index_multi; ↵mattip2019-03-292-23/+83
| | | | | | | | | | | | | | | | | | | | | | | | clarify error msg
* | | | | | Merge pull request #13354 from IntelPython/add-rfftn-axes-testMatti Picus2019-04-181-0/+10
|\ \ \ \ \ \ | | | | | | | | | | | | | | TST: Added test_fftpocket.py::test_axes
| * | | | | | TST: Added test_fftpocket.py::test_axesOleksandr Pavlyk2019-04-171-0/+10
| | |_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | Test for ND transforms with axes for invariance of permutation of axes.
* | | | | | Merge pull request #13293 from mattip/errmsgMatti Picus2019-04-181-13/+12
|\ \ \ \ \ \ | | | | | | | | | | | | | | DOC: add more info to failure message
| * | | | | | DOC: add more info to failure messagemattip2019-04-111-13/+12
| | | | | | |
* | | | | | | Merge pull request #12889 from ivanov/no-pickles-for-youCharles Harris2019-04-166-16/+35
|\ \ \ \ \ \ \ | |_|/ / / / / |/| | | | | | BUG: Make allow_pickle=False the default for loading
| * | | | | | BUG: load fails when using pickle without allow_pickle=TruePaul Ivanov2019-04-166-16/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a partial mitigation of #12759. see also https://nvd.nist.gov/vuln/detail/CVE-2019-6446
* | | | | | | Merge pull request #13337 from kritisingh1/conjMatti Picus2019-04-163-0/+10
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | DOC: Add docstrings for consistency in aliases
| * | | | | | | DOC: Add docstrings for consistency in aliaseskritisingh12019-04-163-0/+10
| | | | | | | |
* | | | | | | | Merge pull request #13346 from eric-wieser/tidy-typeinfoCharles Harris2019-04-163-21/+46
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | BUG/MAINT: Tidy typeinfo.h and .c
| * | | | | | | | BUG/MAINT: Tidy typeinfo.h and .cEric Wieser2019-04-163-21/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add missing headers that happened to be included before this file * Fix accidentally exported symbols * Move registering types in `multiarray.__dict__` to the source file that creates the types * Add missing error checking to make up for PyStructSequence_InitType2 not being available
* | | | | | | | | Merge pull request #13348 from eric-wieser/poly1d-fixes-fixes-fixes-fixesCharles Harris2019-04-162-11/+17
|\ \ \ \ \ \ \ \ \ | |_|_|/ / / / / / |/| | | | | | | | BUG: Return the coefficients array directly
| * | | | | | | | Merge branch 'master' into poly1d-fixes-fixes-fixes-fixesEric Wieser2019-04-16910-86608/+136652
| |\ \ \ \ \ \ \ \ | |/ / / / / / / / |/| | | | | | | |
* | | | | | | | | Merge pull request #13331 from rgommers/fix-docsMatti Picus2019-04-1512-224/+122
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | DOC, BLD: fix doc build issues in preparation for the next numpydoc release
| * | | | | | | | | DOC: fix doc build warnings in a cleaner way.Ralf Gommers2019-04-151-6/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Addresses review comment by @eric-wieser.
| * | | | | | | | | DOC: fix 4 remaining doc build warnings.Ralf Gommers2019-04-142-33/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2 for polyfit rankwarning, 2 for divide by zero in log10.
| * | | | | | | | | DOC: fix some more See Also issuesRalf Gommers2019-04-147-21/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These ones just generated warnings, not build failures
| * | | | | | | | | DOC: fix doc formatting issues exposed by numpydoc 0.9.0rc1Ralf Gommers2019-04-148-14/+14
| | | | | | | | | |
| * | | | | | | | | DOC: fix issues with See Also sections of generic.Ralf Gommers2019-04-141-156/+52
| | |_|/ / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It used a sentence rather than an object to cross-reference. numpydoc grew more picky (see https://github.com/numpy/numpydoc/issues/206), so cleaning this up. It was already not rendering correctly in html.
* | | | | | | | | Merge pull request #13312 from eric-wieser/genfromtxt-closeTyler Reddy2019-04-152-270/+284
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | BUG: Close files if an error occurs in genfromtxt
| * | | | | | | | | TST: unit test for gh-13200Tyler Reddy2019-04-131-1/+14
| | | | | | | | | |
| * | | | | | | | | BUG: Close files if an error occurs in genfromtxtEric Wieser2019-04-121-269/+270
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mostly indentation changes Fixes gh-13200
* | | | | | | | | | Merge pull request #13335 from eric-wieser/document-ctypeslibMatti Picus2019-04-154-8/+13
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | DOC: Add as_ctypes_type to the documentation
| * | | | | | | | | | DOC: Add as_ctypes_type to the documentationEric Wieser2019-04-154-8/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is mentioned in the release notes, so probably should be discoverable. Change those mentions to links. Fix the docstring to not cause sphinx to emit warnings.
* | | | | | | | | | | Merge pull request #13316 from AnderUstarroz/added-antidiagonal-examplesMatti Picus2019-04-152-8/+40
|\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | DOC: Added anti-diagonal examples to np.diagonal and np.fill_diagonal
| * | | | | | | | | | | DOC: Added anti-diagonal examples to np.diagonal and np.fill_diagonalAnder Ustarroz2019-04-132-8/+40
| | | | | | | | | | | |
* | | | | | | | | | | | Merge pull request #13328 from eric-wieser/fix-weird-reduce-logicMatti Picus2019-04-151-25/+27
|\ \ \ \ \ \ \ \ \ \ \ \ | |_|/ / / / / / / / / / |/| | | | | | | | | | | MAINT: Tidy up error message for accumulate and reduceat