summaryrefslogtreecommitdiff
path: root/doc/source/reference
Commit message (Collapse)AuthorAgeFilesLines
* DOC: correct possible list lengths for `extobj` in ufunc callsJosh Wilson2020-03-221-5/+5
| | | | | | | | | | | | | | | | | | | According to the docs, the list can be of lengths 1, 2, or 3, but only length 3 appears to work: ``` >>> import numpy as np >>> np.sin(1, extobj=[16, 1, lambda: None]) 0.8414709848078965 >>> np.sin(1, extobj=[16, 1]) Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: UFUNC_PYVALS must be a length 3 list. >>> np.sin(1, extobj=[16]) Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: UFUNC_PYVALS must be a length 3 list. ```
* BUG: add missing c_distributions.pxd, enables cython use of random C-API ↵Matti Picus2020-03-161-2/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (gh-15463) xref gh-14778 As pointed out in the comment by @jamesthomasgriffin, we did not include a pxd file to expose the distribution functions documented in the random c-api. This PR adds a c_distributions.pxd file that exposes them. Squashed commits: * BUG: add missing c_distributions.pxd to enable cython use of random C-API * ENH, TST: add npyrandom library like npymath, test cython use of it * BUG: actually prefix f-string with f * MAINT: fixes from review, add _bit_generato_bit_generator.pxd * STY: fixes from review * BLD: don't use nprandom library for mtrand legacy build * TST: WindowsPath cannot be used in subprocess's list2cmdline * MAINT, API: move _bit_generator to bit_generator * DOC: add release note about moving bit_generator * DOC, MAINT: fixes from review * MAINT: redo dtype determination from review
* DOC: Refactor `np.polynomial` docs using `automodule` (#15662)Ross Barnowski2020-03-128-555/+43
| | | * DOC: Refactor polynomial docs using automodule.
* DOC: Fix coremath.rst to fix refguide_check (#15718)Pierre de Buyl2020-03-061-1/+6
| | | | | * DOC: fix coremath.rst to fix refguide_check Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
* Merge pull request #15717 from pdebuyl/fix_refguide_datetimeMatti Picus2020-03-061-51/+25
|\ | | | | DOC: update datetime reference to pass refguide
| * Update doc/source/reference/arrays.datetime.rstPierre de Buyl2020-03-061-2/+1
| | | | | | Co-Authored-By: Eric Wieser <wieser.eric@gmail.com>
| * DOC: move deprecation info to apart paragraph.Pierre de Buyl2020-03-061-4/+8
| |
| * reinstate example with offsetPierre de Buyl2020-03-061-0/+2
| |
| * DOC: remove outdated example and sectionPierre de Buyl2020-03-061-51/+20
| | | | | | | | | | | | Remove example with timezone Remove section on changes in NumPy 1.11
* | Merge pull request #15534 from seberg/deprecate-abstract-scalar-typesMatti Picus2020-03-061-2/+14
|\ \ | |/ |/| DEP: Do not allow "abstract" dtype conversion/creation
| * Fixup: Do not deprecate generic python typesSebastian Berg2020-02-071-2/+14
| | | | | | | | | | Add a comment that we can think about only allowing it for `dtype=...` though...
* | DOC: Fix indexing docs to pass refguide (#15694)Pierre de Buyl2020-03-041-21/+12
| | | | | | | | * DOC: Add missing imports, np prefix, fix printing, fix examples Co-Authored-By: Eric Wieser <wieser.eric@gmail.com>
* | DOC: Add missing imports, definitions and dummy file (#15616)Pierre de Buyl2020-03-031-2/+7
| | | | | | | | | | * DOC: fix imports and defs to pass refguide checks Add empty file foo.c at runtime to run distutils config.
* | DOC: fix printing, np., deprecation for refguidePierre de Buyl2020-02-211-9/+10
| | | | | | | | | | | | | | | | | | | | Deprecation fixes: - Change Float64 example to float64. - Remove shape=(1,) example for type strings. Add missing np prefix. Fix output to match current NumPy printing.
* | update doctests, small bugs and changes of reprPierre de Buyl2020-02-065-58/+69
|/ | | | | | | | | | Fix missing np prefix. Fix missing definitions. Use print function instead of the statement. Add seed to make output repeatable.
* Merge pull request #15427 from seberg/deprecate-unused-c-apiMatti Picus2020-02-022-72/+16
|\ | | | | DEP: Schedule unused C-API functions for removal/disabling
| * DEP: Deprecate PyUFunc_GenericFunction public C-API functionSebastian Berg2020-01-311-9/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This function provides mainly the same API as PyObject_Call() with the exception of skipping ufunc overrides and output array wraps. It is fairly unwieldy to use, since ownership of all inputs and outputs is transferred, but otherwise it still uses args and kwargs as inputs. As such, no known usage exists and PyObject_Call seems a reasonable replacement for possible usage. Keeping it around means that we would may have to add tests or risk breaking this function when ufunc code is refactored.
| * DEP: Schedule PyArray_GetArrayParamsFromObject for removalSebastian Berg2020-01-311-63/+6
| | | | | | | | | | | | | | | | | | | | The function has no known usage outside of NumPy. It is fairly complex to use due to how it behaves with scalars, and, at least with a given "flexible" dtype would require additional access to the private PyArray_AdaptFlexibleDType function. Removing the function from public API will simplify refactor work of the dtype and dimension recovery.
* | Merge pull request #15338 from mattip/site.cfgCharles Harris2020-01-311-0/+5
|\ \ | | | | | | DOC: document site.cfg.example
| * | DOC: link and cleanup docstrings in site.cfg.examplemattip2020-01-201-0/+5
| | |
* | | DOC: distutils: Add a docstring to show_config().Warren Weckesser2020-01-251-0/+1
| | | | | | | | | | | | | | | | | | | | | Thanks to Sergey Kojoian for the original patch to create the docstring. Closes gh-9258.
* | | DOC: Fix Multithreaded Generation example docs (gh-15367)Fabio Zeiser2020-01-241-29/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The old code examples did not actually run correctly and had a bug. They were also never updated to use SeedSequence correctly. This fixes both. * DOC, BUG: Fixes Multithreaded Generation docs Working on #15365 The code runs now, but I get quite different runtimes than in the example. May need some more work * DOC: changes after PR review * DOC: Changing input/output lines to sphinx standard For ipython example: Adding `Out[i]` where i is the input cell number and correcting vissual multiline inputs * MAINT: Replace `jumped` by `SeedSequence` in multithreading snippet After PR review, decided to replace `jumped` by `SeedSequence` as it is a more general method. Adopted the introduction to reflect this. Also added a section on the reproducibility for different machines and number of threads + an example. * MAINT: Changes after PR review - Switch back to default_rng() instead of the Generator(BitGenerator)) syntax pursuant @rkern 's explanation in #15391 - small fixes * MAINT: Delete unneccesary reference to PCG64 * MAINT: Added newline finxing codeblock error in docs Trying to see whether this fixes circleci error * MAINT: Clean up in imports of code snippet
* | | MAINT: Const qualify UFunc inner loops (gh-15355)Kai Striega2020-01-211-30/+32
| |/ |/| | | | | | | This PR const qualifies the dimension and strides arguments of PyUFuncGenericFunction. Const qualified arguments make it simpler to reason about the behaviour of these ufuncs and prevents accidental mutation. As the const is now required this PR also const qualifies calls to PyUFuncGenericFunction inside the NumPy source code. This closes #15252
* | DOC: NumPy for absolute beginners tutorial (#14546)Anne Bonner2020-01-212-0/+4
| | | | | | | | | | | | | | This absolute beginners tutorial is the output of Anne's Google Season of Docs project. An intermediate version was also published at https://towardsdatascience.com/the-ultimate-beginners-guide-to-numpy-f5a2f99aef54
* | Merge pull request #15118 from mattip/cleanup-array-callSebastian Berg2020-01-161-11/+10
|\ \ | |/ |/| API: remove undocumented use of __array__(dtype, context)
| * MAINT: remove undocumented use of context in __array__(dtype, context)mattip2020-01-161-11/+10
| |
* | DEP: Deprecate `->f->fastclip` at registration timeSebastian Berg2020-01-151-1/+11
| | | | | | | | | | This adds the additional deprecation of fastclip if it is set at registration time instead of only testing that it is never used.
* | Merge pull request #14942 from seberg/clean-fasttakeMatti Picus2020-01-161-2/+10
|\ \ | | | | | | MAINT,API: ignore and NULL fasttake/fastputmask ArrFuncs slots
| * | DEP: Actually deprecate fasttake and fastclipmaskSebastian Berg2020-01-151-2/+10
| | |
* | | DOC: fix typosBrian Wignall2020-01-141-5/+5
| |/ |/|
* | Merge pull request #15264 from hippo91/missing_ufuncs_in_docMatti Picus2020-01-071-0/+4
|\ \ | |/ |/| DOC: Add some missing functions in the list of available ufuncs.
| * DOC: Add some missing functions in the list of available ufuncs.hippo912020-01-061-0/+4
| | | | | | | | See #15214
* | MAINT: Improve const-correctness of shapes and stridesEric Wieser2020-01-061-1/+1
| | | | | | | | | | | | Marking these arguments as const makes it easier to reason about these functions, and prevent accidental mutation. The C99 standard (6.2.5/26 "Types") guarantees that ABI compatibility is preserved here.
* | MAINT: Remove implicit inheritance from object class (#15236)Jon Dufresne2020-01-051-1/+1
| | | | | | | | | | | | | | Inheriting from object was necessary for Python 2 compatibility to use new-style classes. In Python 3, this is unnecessary as there are no old-style classes. Dropping the object is more idiomatic Python.
* | MAINT: Remove unnecessary 'from __future__ import ...' statementsJon Dufresne2020-01-031-4/+0
|/ | | | | As numpy is Python 3 only, these import statements are now unnecessary and don't alter runtime behavior.
* Merge pull request #15129 from bwignall/typo_levenMatti Picus2019-12-192-3/+3
|\ | | | | DOC: Fix typos, via a Levenshtein-style corrector
| * Fix typos, via a Levenshtein-style correctorBrian Wignall2019-12-192-3/+3
| |
* | DOC: linalg: Include information about scipy.linalg. (#14988)Warren Weckesser2019-12-191-0/+12
|/ | | * DOC: Add links to scipy linalg fuctions and compare numpy.linalg vs scipy.linalg.
* Merge pull request #14933 from seberg/cleanup-converttocommontypeMatti Picus2019-12-181-8/+12
|\ | | | | API: Use `ResultType` in `PyArray_ConvertToCommonType`
| * API: Use `ResultType` in `PyArray_ConvertToCommonType`Sebastian Berg2019-11-211-8/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This slightly modifies the behaviour of `np.choose` (practically a bug fix) and the public function itself. The function is not used within e.g. SciPy, so the small performance hit of this implementation is probably insignificant. The change should help clean up dtypes a bit, since the whole "scalar cast" logic is brittle and should be deprecated/removed, and this is probably one of the few places actually using it. The choose change means that: ``` np.choose([0], (1000, np.array([1], dtype=np.uint8))) ``` will actually return a value of 1000 (the dtype not being uint8).
* | DOC: Remove reference to basic RNGKevin Sheppard2019-12-181-5/+5
| | | | | | | | Remove reference to outdated basic RNG
* | DOC: change to link (from review)mattip2019-12-052-2/+4
| |
* | API, DOC: change names to multivariate_hypergeometric, improve docsmattip2019-12-042-18/+8
| |
* | DOC: fixes from reviewmattip2019-12-034-15/+7
| |
* | DOC: sphinx does not like breaking function declarations over linesmattip2019-11-291-17/+5
| |
* | API: rename functions in distributions.c,hmattip2019-11-291-10/+2
| |
* | DOC, TST: refactor CFFI test, add file names to documentationmattip2019-11-293-0/+6
| |
* | DOC: improve the C-API/Cython documentation for randommattip2019-11-292-50/+99
| |
* | MAINT: Change Congruent to Congruential in PCGCharles Harris2019-11-281-2/+2
| | | | | | [skip ci]
* | DOC: Fix abbreviation of PCG64Martin Thoma2019-11-281-1/+1
| | | | | | | | | | | | | | See publication by O'Neill (reference 2): "The name for the family, PCG, stands for permuted congruential generator [...]"