summaryrefslogtreecommitdiff
path: root/numpy
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #10970 from eric-wieser/cut-down-ctypeslibCharles Harris2018-06-072-114/+96
|\ | | | | WIP: Remove fragile use of __array_interface__ in ctypeslib.as_array
| * BUG: Remove fragile use of __array_interface__ in ctypeslib.as_arrayEric Wieser2018-05-262-109/+72
| | | | | | | | | | | | | | | | | | | | Everything behaves a lot better if we let the array constructor handle it, which will use the ctypes PEP3118 support. Bugs this fixes: * Stale state being attached to pointer objects (fixes gh-2671, closes gh-6214) * Weird failure modes on structured arrays (fixes-10978) * A regression in gh-10882 (fixes gh-10968)
| * MAINT: Pull repeated decorators up to their containing classEric Wieser2018-04-241-12/+9
| |
| * MAINT: Use assert_equalEric Wieser2018-04-241-4/+4
| |
| * TST: Add tests for numpy.ctypeslib.as_arraytynn2018-04-241-2/+24
| |
* | Merge pull request #11018 from mhvk/gufunc-axis-and-keepdimsCharles Harris2018-06-075-20/+246
|\ \ | | | | | | ENH: Implement axis for generalized ufuncs.
| * | TST: Add a new gufunc with (i)->(i) signature for testing with axis.Marten van Kerkwijk2018-06-072-1/+64
| | |
| * | MAINT: Interpret gufunc axis directly rather than construct axes.Marten van Kerkwijk2018-06-071-56/+63
| | | | | | | | | | | | Much faster, and much less code duplication than I feared.
| * | MAINT: let ufunc override reject passing in both axis and axes.Marten van Kerkwijk2018-06-072-2/+11
| | |
| * | ENH: add "axis" argument to generalized ufuncs.Marten van Kerkwijk2018-06-072-13/+160
| | | | | | | | | | | | | | | It is only allowed for gufuncs with a single, shared core dimension.
* | | Merge pull request #11122 from mhvk/assert-array-comparison-with-maskedCharles Harris2018-06-073-41/+57
|\ \ \ | | | | | | | | BUG,MAINT: Ensure masked elements can be tested against nan and inf.
| * | | MAINT: clean up assert_array_compare a bit further.Marten van Kerkwijk2018-06-043-10/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This brought to light two bugs in tests, which are fixed here, viz., that a sample ndarray subclass that tested propagation of an added parameter was incomplete, in that in propagating the parameter in __array_wrap__ it assumed it was there on self, but that assumption could be broken when a view of self was taken (as is done by x[~flagged] in the test routine), since there was no __array_finalize__ defined. The other subclass bug counted, incorrectly, on only needing to provide one type of comparison, the __lt__ being explicitly tested. But flags are compared with __eq__ and those flags will have the same subclass.
| * | | BUG,MAINT: Ensure masked elements can be tested against nan and inf.Marten van Kerkwijk2018-05-272-38/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The removal of nan and inf from arrays that are compared using test routines like assert_array_equal treated the two arrays separately, which for masked arrays meant that some elements would not be removed when they should have been. This PR corrects this.
* | | | Merge pull request #10444 from ahaldane/dragon4_otherformats_splitCharles Harris2018-06-076-14/+335
|\ \ \ \ | | | | | | | | | | MAINT: Implement float128 dragon4 for IBM double-double (ppc64)
| * | | | BUG: Implement float128 dragon4 for IBM double-double (ppc64)Allan Haldane2018-06-066-14/+335
| | |/ / | |/| |
* | | | BUG: Correct use of NPY_UNUSED.Charles Harris2018-06-071-1/+1
|/ / / | | | | | | | | | | | | | | | Replace `NPY_UNUSED(*param)` by `*NPY_UNUSED(param)`. Closes #11267.
* | | Merge pull request #11257 from mhvk/ufunc-parsing-no-borrowed-refsMarten van Kerkwijk2018-06-062-13/+33
|\ \ \ | | | | | | | | BUG: ensure extobj and axes have their own references.
| * | | BUG: ensure extobj and axes have their own references.Marten van Kerkwijk2018-06-062-13/+33
| | | |
* | | | Merge pull request #11167 from ahaldane/dragon4_float128_part1Charles Harris2018-06-053-541/+839
|\ \ \ \ | | | | | | | | | | MAINT: Cleanup dragon4 code in various ways
| * | | | MAINT: Add comment in dragon4 code.Charles Harris2018-06-051-0/+1
| | | | | | | | | | | | | | | [ci skip]
| * | | | MAINT: replace static BigInts in dragon4 by dummy managerAllan Haldane2018-06-041-127/+196
| | | | |
| * | | | MAINT: Reorganize Dragon4 code to clarify float formatsAllan Haldane2018-06-043-466/+694
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | Define the float format macros NPY_*_BINFMT. Reorg formatting functions to refer to specific formats. Make BigInt variables static to avoid using up stack space. Dragon4 now takes a BigInt mantissa, not uint64. Define Dragon4_Options struct to pass options.
* | | | Merge pull request #11249 from eric-wieser/0d-complex-contiguousCharles Harris2018-06-052-1/+16
|\ \ \ \ | | | | | | | | | | BUG: Remove errant flag meddling in .real and .imag
| * | | | BUG: Remove errant flag meddling in .real and .imagEric Wieser2018-06-052-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes #11245 PyArray_NewFromDescr sets the flags just fine by itself.
* | | | | Merge pull request #11247 from eric-wieser/simplify-incref-handlingMatti Picus2018-06-051-8/+4
|\ \ \ \ \ | | | | | | | | | | | | MAINT/BUG: Remove out-of-band reference count in PyArray_Newshape, fix memory leak
| * | | | | BUG: Prevent memory leak if PyArray_NewCopy failsEric Wieser2018-06-051-1/+1
| | | | | |
| * | | | | MAINT: Remove out-of-band reference count in PyArray_NewshapeEric Wieser2018-06-041-8/+4
| |/ / / /
* | | | | MAINT: Don't update the flags a second timeEric Wieser2018-06-045-30/+0
|/ / / / | | | | | | | | | | | | `PyArray_UpdateFlags(view, NPY_ARRAY_UPDATE_ALL);` is already called within PyArray_NewFromDescr_int
* | | | Merge pull request #11239 from eric-wieser/expose-global-descrsCharles Harris2018-06-046-53/+59
|\ \ \ \ | | | | | | | | | | MAINT: Use PyArray_NewFromDescr where possible, remove unused definitions
| * | | | MAINT: Use PyArray_NewFromDescr in place of PyArray_New for known numeric typesEric Wieser2018-06-035-49/+59
| | | | | | | | | | | | | | | | | | | | This makes it a little easier to convert these calls to PyArray_NewFromDescr_int if new parameters are needed in future.
| * | | | MAINT: Remove unused definitionsEric Wieser2018-06-031-4/+0
| | | | |
* | | | | Merge pull request #11238 from eric-wieser/deduplicate-update-flagsCharles Harris2018-06-045-14/+0
|\ \ \ \ \ | | | | | | | | | | | | MAINT: Don't update the flags a second time
| * | | | | MAINT: Don't update the flags a second timeEric Wieser2018-06-035-14/+0
| |/ / / / | | | | | | | | | | | | | | | `PyArray_UpdateFlags(view, NPY_ARRAY_UPDATE_ALL);` is already called within PyArray_NewFromDescr_int
* | | | | Merge pull request #11240 from eric-wieser/remove-py2.6-warningsCharles Harris2018-06-041-92/+1
|\ \ \ \ \ | |_|/ / / |/| | | | MAINT: Remove dead code backporting py2.6 warnings
| * | | | BUG: Import WarningMessage from warnings.Charles Harris2018-06-041-0/+1
| | | | |
| * | | | MAINT: Remove dead code backporting py2.6 warningsEric Wieser2018-06-041-92/+0
| |/ / / | | | | | | | | | | | | Since this is now in `np.testing._private`, it's no longer usable by the outside world anyway
* | | | BUG: Prevent underflow causing empty result in arange (#10263)Licht Takeuchi2018-06-032-7/+97
|/ / / | | | | | | | | | | | | When given a step size larger than the difference between `start` and `stop`, arange would sometimes give `[]` and sometimes `[start]`, depending on the relative magnitudes. Now the result is always `[start]`, even if the step is infinite, or underflow occurs. Fixes #10206
* | | Merge pull request #11223 from pgunn/memmap_promote_shape_uint64Charles Harris2018-06-031-2/+1
|\ \ \ | | | | | | | | MAINT: Forcibly promote shape to uint64 in numpy.memmap.
| * | | reviewPat Gunn2018-06-031-1/+1
| | | |
| * | | Revise further as per peer reviewPat Gunn2018-06-031-2/+1
| | | |
| * | | Revise further as per peer reviewPat Gunn2018-06-031-2/+1
| | | |
| * | | Responding to peer review, change to intpPat Gunn2018-06-031-2/+2
| | | |
| * | | In numpy.memmap forcibly promote shape to uint64Pat Gunn2018-06-011-1/+2
| | | |
* | | | Merge pull request #11209 from Peque/doctestCharles Harris2018-06-031-3/+2
|\ \ \ \ | | | | | | | | | | DOC: Fix doctest formatting in `rot90()` examples
| * | | | DOC: Fix doctest formatting in `rot90()` examplesMiguel Sánchez de León Peque2018-06-011-3/+2
| | | | |
* | | | | Merge pull request #11089 from ahaldane/speedup_build_all_filesCharles Harris2018-06-032-4/+9
|\ \ \ \ \ | | | | | | | | | | | | BLD: cleanup _configtest.o.d during build
| * | | | | BLD: cleanup _configtest.o.d during buildAllan Haldane2018-06-012-4/+9
| | | | | |
* | | | | | Merge pull request #11231 from mhvk/ufunc-get-arg-tuple-short-circuitEric Wieser2018-06-021-0/+4
|\ \ \ \ \ \ | | | | | | | | | | | | | | MAINT: ensure we do not create unnecessary tuples for outputs
| * | | | | | MAINT: ensure we do not create unnecessary tuples for outputsMarten van Kerkwijk2018-06-021-0/+4
| | |/ / / / | |/| | | | | | | | | | | | | | | | Small thing missed in gh-10919.
* | | | | | Merge pull request #11191 from ahaldane/remove_darwin_float128Charles Harris2018-06-025-47/+7
|\ \ \ \ \ \ | | | | | | | | | | | | | | MAINT: remove darwin hardcoded LDOUBLE detection