summaryrefslogtreecommitdiff
path: root/numpy
Commit message (Collapse)AuthorAgeFilesLines
* Update numpy/core/fromnumeric.py with review commentBharat Raghunathan2020-02-011-1/+1
| | | Co-Authored-By: Eric Wieser <wieser.eric@gmail.com>
* [DOC] Mention special case of np.squeeze with one elementBharat Raghunathan2020-02-011-1/+14
|
* Merge pull request #15338 from mattip/site.cfgCharles Harris2020-01-312-61/+121
|\ | | | | DOC: document site.cfg.example
| * DOC: changes from reviewmattip2020-01-261-0/+1
| |
| * DOC: link and cleanup docstrings in site.cfg.examplemattip2020-01-202-61/+120
| |
* | DOC: Correct get_state docKevin Sheppard2020-01-311-5/+7
| | | | | | | | Move flag to parameters
* | Merge pull request #15474 from eric-wieser/cleanup-scalar-new-gotoSebastian Berg2020-01-301-34/+18
|\ \ | | | | | | MAINT: Eliminate messy _WORK macro
| * | MAINT: Eliminate messy _WORK macroEric Wieser2020-01-301-34/+18
| | | | | | | | | | | | As requested during review of previous cleanups
* | | Merge pull request #15469 from eric-wieser/remove-unreachableSebastian Berg2020-01-291-39/+42
|\ \ \ | |/ / | | | MAINT: Simplify scalar __new__ some more
| * | MAINT: Simplify scalar __new__ some moreEric Wieser2020-01-301-39/+42
| | | | | | | | | | | | | | | | | | | | | | | | The comment about base-classes doing conversions was incorrect - these always return objects of the right type The only way the `Py_TYPE(robj) == type` can fail is if the type cannot survive round-tripping through `PyArray_DescrFromType` and `PyArray_FromAny`. The former applies to subclasses of numpy types, while the latter is probably caused by a bug elsewhere. This allows the `goto` to be eliminated, which means all the declarations can be pushed down.
* | | Merge pull request #15417 from sethtroisi/python2_easyMatti Picus2020-01-294-14/+7
|\ \ \ | | | | | | | | MAINT: Cleanup references to python2
| * | | MAINT: Python2 CleanupsSeth Troisi2020-01-284-14/+7
| | | |
* | | | Merge pull request #15452 from mwtoews/E401Matti Picus2020-01-299-15/+28
|\ \ \ \ | | | | | | | | | | STY,MAINT: avoid 'multiple imports on one line'
| * | | | STY,MAINT: avoid 'multiple imports on one line' (flake8 E401)Mike Taves2020-01-289-15/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * PEP 8: "Imports should usually be on separate lines" * Where modified, sort imported modules alphabetically * Clean-up unused imports from these expanded lines
* | | | | Merge pull request #15451 from eric-wieser/cleanup-scalar-new-gotoSebastian Berg2020-01-281-30/+23
|\ \ \ \ \ | | |_|/ / | |/| | | MAINT: Simplify `np.object_.__new__`
| * | | | MAINT: Simplify `np.object_.__new__`Eric Wieser2020-01-271-30/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is super hard to read for being part of a templated function which it has very little in common with. Writing out OBJECT_arrtype_new separately makes it easier to follow, and possible to simplify. It also uses fewer lines!
* | | | | MAINT: refactoring in np.core.records (gh-15195)Daniel Hrisca2020-01-281-19/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * remove parentheses in the if statements * use tuples instead of lists in if conditions * use tuples instead of chained OR conditions Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Sebastian Berg <sebastian@sipsolutions.net>
* | | | | MAINT: Remove sys.version checks (gh-#15373)Seth Troisi2020-01-287-138/+58
| | | | | | | | | | | | | | | More sys.version cleanup.
* | | | | MAINT: dir(numpy) returned duplicate "testing" (gh-15425)SanthoshBala182020-01-272-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | Modified __dir__() to remove duplicate "Tester/Testing" attribute. Also added a test to verify this. Closes gh-15383
* | | | | BUG: np.load does not handle empty array with an empty descr (#15397)Sha Liu2020-01-272-8/+13
| |/ / / |/| | | | | | | | | | | | | | | | | | | | | | | The bug occurs since numpy 1.16. Before that empty descr corresponds to `np.dtype([])`. This fixes the problem by following numpy 1.15's behavior. Closes gh-15396
* | | | STY: use 'yield from <expr>' for simple cases (#15444)Mike Taves2020-01-2711-52/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This PR uses simple cases of PEP 380 to rewrite: for v in g: yield v into: yield from <expr>
* | | | Merge pull request #15446 from eric-wieser/reject-garbage-argumentsEric Wieser2020-01-273-16/+53
|\ \ \ \ | |_|/ / |/| | | BUG: Reject nonsense arguments to scalar constructors
| * | | BUG: Delay DECREF of the dtype in `np.datetime_data`Sebastian Berg2020-01-271-2/+4
| |/ /
| * | BUG: Reject nonsense arguments to scalar constructorsEric Wieser2020-01-272-14/+49
| | | | | | | | | | | | Fixes #11304
* | | Merge pull request #15441 from eric-wieser/tidy-work-scalar-ctorSebastian Berg2020-01-271-34/+36
|\ \ \ | |/ / | | | MAINT: Tidy macros in scalar_new
| * | MAINT: Tidy macros in scalar_newEric Wieser2020-01-271-34/+36
| | | | | | | | | | | | Rather than trying to keep track of weird tri-state `@default@` and `@work@` variables, this uses a primitive dictionary with types as keys.
* | | Merge pull request #15381 from sethtroisi/matlib_namespaceMatti Picus2020-01-273-9/+15
|\ \ \ | | | | | | | | DEP: add PendingDeprecation to matlib.py funky namespace
| * | | DEP: deprecate importing numpy/matrixlib.pySeth Troisi2020-01-233-8/+12
| | | |
| * | | DOC: Describe matlib.py funky namespaceSeth Troisi2020-01-231-1/+3
| | | |
* | | | Merge pull request #15421 from sethtroisi/contextlib_py2Matti Picus2020-01-271-21/+12
|\ \ \ \ | | | | | | | | | | ENH: Make use of ExitStack in npyio.py
| * | | | ENH: Make use of ExitStack in npyio.pySeth Troisi2020-01-241-21/+12
| | | | |
* | | | | Merge pull request #15429 from WarrenWeckesser/config-docstringEric Wieser2020-01-271-0/+37
|\ \ \ \ \ | | | | | | | | | | | | DOC: distutils: Add a docstring to show_config().
| * | | | | DOC: distutils: Add a docstring to show_config().Warren Weckesser2020-01-251-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Thanks to Sergey Kojoian for the original patch to create the docstring. Closes gh-9258.
* | | | | | Merge pull request #15434 from notanton/maintenance-fstringsCharles Harris2020-01-2610-68/+61
|\ \ \ \ \ \ | |_|_|_|/ / |/| | | | | MAINT: Updated polynomial to use fstrings
| * | | | | Updated files in polynomial/ to use fstringsAnton Ritter-Gogerly2020-01-2710-68/+61
| |/ / / /
* | | | | Update core.py with f-strings (issue #15420)Anthony2020-01-261-2/+5
| | | | | | | | | | | | | | | Corrected past shortcomings
* | | | | Update core.pyAnthony2020-01-261-27/+16
| | | | | | | | | | | | | | | Replace old strings format to fstrings
* | | | | Merge pull request #15428 from sethtroisi/ctype_longlongMatti Picus2020-01-261-14/+11
|\ \ \ \ \ | | | | | | | | | | | | DOC: Improve ndarray.ctypes example
| * | | | | DOC: Improve nparray.ctypes exampleSeth Troisi2020-01-241-14/+11
| | |/ / / | |/| | |
* | | | | Merge pull request #15414 from sethtroisi/python2_refsMatti Picus2020-01-268-28/+29
|\ \ \ \ \ | |_|/ / / |/| | | | MAINT: Remove Python2 workarounds
| * | | | MAINT: Remove Python2 workaroundsSeth Troisi2020-01-238-28/+29
| |/ / /
* | | | Merge pull request #15422 from sethtroisi/buff_cleanupSebastian Berg2020-01-241-34/+2
|\ \ \ \ | | | | | | | | | | MAINT: Inline gentype_getreadbuf
| * | | | MAINT: Inline gentype_getreadbufSeth Troisi2020-01-241-34/+2
| |/ / /
* | | | Merge pull request #15418 from mwtoews/builtinCharles Harris2020-01-243-7/+3
|\ \ \ \ | | | | | | | | | | MAINT, DOC: Remove use of old Python __builtin__, now known as builtins
| * | | | MAINT/DOC: Remove use of old Python __builtin__, now known as builtinsMike Taves2020-01-243-7/+3
| |/ / /
* | | | MAINT: Use the PyArrayScalar_VAL macro where possible (gh-15426)Eric Wieser2020-01-244-37/+37
| | | | | | | | | | | | | | | | | | | | If we have this macro, we may as well use it. This changes all occurences except the Void ones, since there other fields that don't have accessor macros are also used.
* | | | MAINT: Revert f2py Python 2.6 workaround (gh-15415)Seth Troisi2020-01-232-12/+2
|/ / / | | | | | | Revert ed916ff#diff-c9eccf467e5f6561061d6a5ac4730330 which was needed to workaround http://bugs.python.org/issue4720 which was fixed 12 years ago.
* | | Merge pull request #15407 from charris/replace-basestringSebastian Berg2020-01-2315-46/+36
|\ \ \ | | | | | | | | MAINT: Replace basestring with str.
| * | | MAINT: Replace basestring with str.Charles Harris2020-01-2315-46/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This replaces basestring with str except in - tools/npy_tempita/ - numpy/compat/py3k.py
* | | | Merge pull request #15398 from mwtoews/urllibCharles Harris2020-01-231-15/+5
|\ \ \ \ | |_|/ / |/| | | MAINT: Revise imports from urllib modules