summaryrefslogtreecommitdiff
path: root/numpy
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #16266 from jbrockmendel/cyapiMatti Picus2020-05-235-1/+276
|\ | | | | ENH: include dt64/td64 structs and funcs and tests in __init__.pxd.
| * blackify, troubleshoot testsjbrockmendel2020-05-221-17/+21
| |
| * ENH: run tests for __init__.pxdmattip2020-05-222-6/+17
| |
| * First stab at tests, try on the CIjbrockmendel2020-05-214-3/+169
| |
| * Fix np.dtype declarationjbrockmendel2020-05-211-1/+1
| |
| * troubleshoot CIjbrockmendel2020-05-211-5/+5
| |
| * move below int64_t declarationjbrockmendel2020-05-211-39/+39
| |
| * Missing declarationsjbrockmendel2020-05-211-0/+23
| |
| * Re-order declarationsjbrockmendel2020-05-211-5/+5
| |
| * ENH: include dt64/td64 isinstance checks in __init__.pxdjbrockmendel2020-05-211-0/+71
| |
* | Merge pull request #16348 from seberg/fromany-leakCharles Harris2020-05-232-0/+11
|\ \ | | | | | | BUG: Fix dtype leak in `PyArray_FromAny` error path
| * | BUG: Fix dtype leak in `PyArray_FromAny` error pathSebastian Berg2020-05-222-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | Also adds a test to bincount which will run into this path. The leak can be triggered by using a reference count checker on the test suit (e.g. pytest-leaks). Closes gh-16339
* | | Merge pull request #16349 from larsoner/depCharles Harris2020-05-232-5/+17
|\ \ \ | | | | | | | | BUG: Indentation for docstrings
| * | | BUG: Indentation for docstringsEric Larson2020-05-222-5/+17
| | | |
* | | | Merge pull request #16298 from eric-wieser/fix-np.infoSebastian Berg2020-05-221-35/+7
|\ \ \ \ | |/ / / |/| | | BUG: np.info does not show keyword-only arguments
| * | | BUG: np.info does not show keyword-only argumentsEric Wieser2020-05-191-35/+7
| | | | | | | | | | | | | | | | | | | | | | | | Using inspect.signature instead of `np.compat.getargspec` solves this problem. `inspect.signature` also handles stripping the `self` argument of methods for us.
* | | | BUILD: Remove Accelerate support (#15759)Matti Picus2020-05-228-362/+36
| |/ / |/| | | | | | | | | | | | | | | | | Remove support for Apple Accelerate, since it is buggy. A build error should occur on most or all setups if linked against Accelerate. Test or import failures should occur on setups where Accelerate is picked up dynamically. Co-authored-by: Warren Weckesser <warren.weckesser@gmail.com>
* | | Merge pull request #16336 from seberg/trivial-refcountfix-add_docstringCharles Harris2020-05-221-1/+2
|\ \ \ | | | | | | | | BUG: Fix refcounting in add_newdoc
| * | | BUG: Fix refcounting in add_newdocSebastian Berg2020-05-211-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | this is a trivial refcounting fix, since this function is mostly used only at startup, the small refcounting issue was not noticed until the new tests were added.
* | | | Merge pull request #16333 from kevmo/homogeneous-16324Ralf Gommers2020-05-222-2/+2
|\ \ \ \ | | | | | | | | | | DOC: Fix spelling typo - homogenous to homogeneous. (#16324)
| * | | | DOC: Fix spelling typo - homogenous to homogeneous. (#16324)Kevin Moore2020-05-212-2/+2
| | | | |
* | | | | Merge pull request #16332 from ↵Matti Picus2020-05-221-0/+4
|\ \ \ \ \ | |_|_|_|/ |/| | | | | | | | | | | | | | LSchroefl/link_SciPy_multidimensional_interpolation DOC: link np.interp to SciPy's interpolation functions (closes #14154)
| * | | | Update numpy/lib/function_base.pyLSchroefl2020-05-221-1/+1
| | | | | | | | | | | | | | | Co-authored-by: Ross Barnowski <rossbar@berkeley.edu>
| * | | | DOC: link np.interp to SciPy's multidimensional interpolation functions (#14154)skywalker2020-05-211-0/+4
| | |_|/ | |/| |
* | | | BUG: Don't segfault on bad __len__ when assigning. (gh-16327)Brandt Bucher2020-05-212-20/+25
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When __getitem__ fails, assignment falls back on __iter__, which may not have the same length as __len__, resulting in a segfault. See gh-7264. * BUG: Don't rely on __len__ for safe iteration. Skip __len__ checking entirely, since this has no guarantees of being correct. Instead, first convert to PySequence_Fast and use that length. Also fixes a refleak when creating a tmp array fails. See gh-7264. * TST: Update test for related edge-case. The previous fix more gracefully handles this edge case by skipping the __len__ check. Rather than raising with an unhelpful error message, just create the array with whatever elements C() actually yields. See gh-7264.
* | | MAINT: Stop Using PyEval_Call* and simplify some usesSebastian Berg2020-05-202-17/+6
| |/ |/| | | | | | | Python 3.9 started to deprecate these calls and the PyObject_Call* variants are equivalent or nicer in any case.
* | Merge pull request #15997 from panpiort8/array_pretty_printMatti Picus2020-05-202-4/+106
|\ \ | | | | | | ENH: improve printing of arrays with multi-line reprs
| * | Make requested changesPan Jan2020-04-271-5/+4
| | |
| * | Improve way of breaking linesPan Jan2020-04-172-9/+43
| | |
| * | Improve testingPan Jan2020-04-162-3/+18
| | |
| * | ENH: improve printing of arrays with multi-line reprsPan Jan2020-04-162-4/+58
| | |
* | | Merge pull request #16239 from seberg/reimport-do-not-set-docsMatti Picus2020-05-205-666/+214
|\ \ \ | | | | | | | | BUG,DOC: Allow attach docs twice but error if wrong
| * | | MAINT: Simplify logic in add_docstringSebastian Berg2020-05-201-52/+17
| | | | | | | | | | | | | | | | | | | | | | | | The old pointers are now provided by the C-API and the macros seemed a bit confusing since ``new`` appears from nowhere being defined in the macro.
| * | | TST: Add a test for np.add_docstringSebastian Berg2020-05-201-1/+39
| | | | | | | | | | | | | | | | | | | | Its not quite the right file, but close to newdoc seemed sensible and we do not have a "right" file right now...
| * | | DOC: Fix generic scalar docstrings to point to ndarraySebastian Berg2020-05-192-610/+124
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously some of these were not set, because they were already set on the C-level. Remove the duplicate message and replace it instead with a forward to the ``ndarray`` attribute/method. These docstrings are inherited by the actual scalars and thus the "virtual class" note was misleading.
| * | | BUG: Allow attaching documentation twice in add_docstringSebastian Berg2020-05-192-3/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This is technically not a bug, but some IDEs and IPython have autoreload magic which can mean that NumPy gets reloaded a second time. This is not safe, but when it happens ignoring that an identical docstring is already attached fixes the issue.
* | | | BLD: Avoid "visibility attribute not supported" warning (gh-16288)E. M. Bray2020-05-201-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I found that when building the latest master branch on Cygwin, while testing #16246, that thousands of warnings were generated at build time like: numpy/core/src/npysort/binsearch.c.src: In function ‘binsearch_left_bool’: numpy/core/src/npysort/binsearch.c.src:82:1: warning: visibility attribute not supported in this configuration; ignored [-Wattributes] Granted this is just a warning, so I don't think it's a serious issue. It seems the test that was supposed to check for __attribute__ support was not working as expected. The #pragmas only take effect if I provide a function body--they are ignored for bare declarations. I don't know if that's by intent, or if it's a GCC issue. For reference: $ gcc --version gcc (GCC) 7.4.0
* | | | BUG: relpath fails for different drives on windows (#16308)Matti Picus2020-05-201-1/+1
| | | | | | | | | | | | | | | | | | | | * BUG: relpath fails for different drives on windows * ENH: always use abspath
* | | | Merge pull request #16284 from eric-wieser/extract-lerpSebastian Berg2020-05-191-62/+58
|\ \ \ \ | | | | | | | | | | MAINT: Clean up the implementation of quantile
| * | | | MAINT: remove workaround for fixed issue Eric Wieser2020-05-191-2/+0
| | | | | | | | | | | | | | | take now correctly returns `out`, even on 0d arrays
| * | | | MAINT: Remove special cases for 0d arrays in quantileEric Wieser2020-05-181-62/+55
| | | | | | | | | | | | | | | | | | | | This also simplifies the axis handling logic, taking advantage of the fact we know `axis` is 0 for the rest of the function body
| * | | | MAINT: Extract a lerp helper function to make the algorithm of quantile clearerEric Wieser2020-05-181-4/+9
| | | | | | | | | | | | | | | | | | | | This does not affect the behavior in any way
* | | | | DOC: Fix documentation rendering,Matthias Bussonnier2020-05-191-1/+1
| |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | the => seem to be extra and rst seem to not interprete backtick with leading space as closing a directive, the the full line on text was put in a html pre-tag when building the docs. see current https://numpy.org/doc/stable/reference/generated/numpy.packbits.html
* | | | MAINT: precompute log(2.0 * M_PI) in `random_loggam' (gh-16237)Elia Franzella2020-05-191-10/+12
| | | | | | | | | | | | | | | | Most compilers should optimize it, but it doesn't hurt to inline and has a better name now.
* | | | Merge pull request #16156 from WarrenWeckesser/deprecate-dualSebastian Berg2020-05-197-13/+28
|\ \ \ \ | | | | | | | | | | DEP: Deprecate `numpy.dual`.
| * | | | DOC: dual: Note the deprecation of numpy.dual in the dual module docstring.Warren Weckesser2020-05-051-4/+10
| | | | | | | | | | | | | | | | | | | | Also make the correction "Scipy" -> "SciPy" in a few places.
| * | | | DEP: Deprecate `numpy.dual`.Warren Weckesser2020-05-047-9/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a deprecation warning in the `numpy.dual` module, and remove the use of `numpy.dual` from the few places where it is used in the numpy code.
* | | | | Merge pull request #16242 from seberg/genfromtxt-default-regressionMatti Picus2020-05-193-5/+15
|\ \ \ \ \ | | | | | | | | | | | | BUG: Fix default fallback in genfromtxt
| * | | | | Update numpy/lib/_iotools.pySebastian Berg2020-05-181-1/+2
| | | | | | | | | | | | | | | | | | Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
| * | | | | BUG: Fix default fallback in genfromtxtSebastian Berg2020-05-183-5/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This affected (for example?) if the `dtype=object` was used without a converter, meaning that the default one is used. And this is currently the last one, which is `string_` (and thus bytes). Closes gh-16189