summaryrefslogtreecommitdiff
path: root/numpy/add_newdocs.py
Commit message (Collapse)AuthorAgeFilesLines
* DOC: merge wiki edits. Add percentile to statistics routines (ML suggestion).Ralf Gommers2012-07-071-5/+17
|
* Remove PyArray_ReduceWrapper from public APINathaniel J. Smith2012-06-161-13/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are two reasons to want to keep PyArray_ReduceWrapper out of the public multiarray API: - Its signature is likely to change if/when masked arrays are added - It is essentially a wrapper for array->scalar transformations (*not* just reductions as its name implies -- the whole reason it is in multiarray.so in the first place is to support count_nonzero, which is not actually a reduction!). It provides some nice conveniences (like making it easy to apply such functions to multiple axes simultaneously), but, we already have a general mechanism for writing array->scalar transformations -- generalized ufuncs. We do not want to have two independent, redundant implementations of this functionality, one in multiarray and one in umath! So in the long run we should add these nice features to the generalized ufunc machinery. And in the short run, we shouldn't add it to the public API and commit ourselves to supporting it. However, simply removing it from numpy_api.py is not easy, because this code was used in both multiarray and umath. This commit: - Moves ReduceWrapper and supporting code to umath/, and makes appropriate changes (e.g. renaming it to PyUFunc_ReduceWrapper and cleaning up the header files). - Reverts numpy.count_nonzero to its previous implementation, so that it loses the new axis= and keepdims= arguments. This is unfortunate, but this change isn't so urgent that it's worth tying our APIs in knots forever. (Perhaps in the future it can become a generalized ufunc.)
* Remove maskna API from ndarray, and all (and only) the code supporting itNathaniel J. Smith2012-06-161-129/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The original masked-NA-NEP branch contained a large number of changes in addition to the core NA support. For example: - ufunc.__call__ support for where= argument - nditer support for arbitrary masks (in support of where=) - ufunc.reduce support for simultaneous reduction over multiple axes - a new "array assignment API" - ndarray.diagonal() returning a view in all cases - bug-fixes in __array_priority__ handling - datetime test changes etc. There's no consensus yet on what should be done with the maskna-related part of this branch, but the rest is generally useful and uncontroversial, so the goal of this branch is to identify exactly which code changes are involved in maskna support. The basic strategy used to create this patch was: - Remove the new masking-related fields from ndarray, so no arrays are masked - Go through and remove all the code that this makes dead/inaccessible/irrelevant, in a largely mechanical fashion. So for example, if I saw 'if (PyArray_HASMASK(a)) { ... }' then that whole block was obviously just dead code if no arrays have masks, and I removed it. Likewise for function arguments like skipna that are useless if there aren't any NAs to skip. This changed the signature of a number of functions that were newly exposed in the numpy public API. I've removed all such functions from the public API, since releasing them with the NA-less signature in 1.7 would create pointless compatibility hassles later if and when we add back the NA-related functionality. Most such functions are removed by this commit; the exception is PyArray_ReduceWrapper, which requires more extensive surgery, and will be handled in followup commits. I also removed the new ndarray.setasflat method. Reason: a comment noted that the only reason this was added was to allow easier testing of one branch of PyArray_CopyAsFlat. That branch is now the main branch, so that isn't an issue. Nonetheless this function is arguably useful, so perhaps it should have remained, but I judged that since numpy's API is already hairier than we would like, it's not a good idea to add extra hair "just in case". (Also AFAICT the test for this method in test_maskna was actually incorrect, as noted here: https://github.com/njsmith/numpyNEP/blob/master/numpyNEP.py so I'm not confident that it ever worked in master, though I haven't had a chance to follow-up on this.) I also removed numpy.count_reduce_items, since without skipna it became trivial. I believe that these are the only exceptions to the "remove dead code" strategy.
* Merge pull request #245 from jseabold/digitize-open-rightTravis E. Oliphant2012-04-041-2/+17
|\ | | | | ENH: Give digitize left or right open interval option
| * DOC: Clarify digitize docs and add exampleSkipper Seabold2012-04-031-5/+11
| |
| * ENH: Give digitize left or right open interval optionSkipper Seabold2012-04-031-2/+11
| |
* | ENH: Add 'sorter' argument to searchsorted.Bryan Van de Ven2012-04-041-1/+1
|/ | | | | | | | The new argument allows one to search an argsorted array by passing in the result of argsorting the array as the 'sorter' argument. For example searchsorted(a, sorter=a.argsort)
* DOC: label the current NA implementation as experimental in 1.7.xRalf Gommers2012-03-301-0/+11
| | | | This has been extensively discussed on the mailing list. See #2072.
* DOC: merge wiki doc edits.Ralf Gommers2012-03-031-5/+16
|
* DOC: putmask: mention copyto is NA-aware, and recommend to switch to it.Ralf Gommers2011-12-301-2/+4
|
* DEP: undeprecate putmask. Used a lot, no need to deprecate it.Ralf Gommers2011-12-301-4/+4
|
* ENH: Add function for adding docstrings to ufuncs.Chris Jordan-Squire2011-08-291-1/+28
|
* DOC: missingdata: Add introductory documentation for NA-masked arraysMark Wiebe2011-08-271-0/+38
|
* ENH: missingdata: Add maskna= and ownmaskna= parameters to np.asarray and ↵Mark Wiebe2011-08-271-1/+14
| | | | | | | | friends Also fix some array() NA mask construction issues and make sure the base object doesn't collapse past the owner of the NA mask being viewed in addition to the data.
* ENH: missingdata: Add maskna= parameter to np.copy and ndarray.copyMark Wiebe2011-08-271-6/+10
|
* ENH: missingdata: Implement skipna= support for np.std and np.varMark Wiebe2011-08-271-1/+1
|
* ENH: missingdata: Support 'skipna=' parameter in np.meanMark Wiebe2011-08-271-4/+27
| | | | | Also add 'keepdims=' parameter to reductions, to support writing of the np.std function.
* ENH: missingdata: Create count_reduce_items functionMark Wiebe2011-08-271-1/+56
| | | | | | | This function either cheaply returns the product of the sizes of all the reduction axes, or counts the number of items which will be used in a reduction operation when skipna is True. Its purpose is to make it easy to do functions like np.mean and np.std.
* ENH: missingdata: Rewrite PyArray_Concatenate to work with NA masksMark Wiebe2011-08-271-2/+5
| | | | | It should also have less memory usage for heterogeneous inputs, because it no longer makes extra copies in that case.
* ENH: missingdata: Add NA support to np.diagonal, change np.diagonal to ↵Mark Wiebe2011-08-271-1/+1
| | | | always return a view
* DOC: ufunc: Document the 'axis=' improvments to reduction functionsMark Wiebe2011-08-271-2/+16
|
* ENH: missingdata: Progress towards supporting ufunc reduce with NA masksMark Wiebe2011-08-271-1/+3
|
* ENH: missingdata: Fill in buffered NAMASK nditer, add maskna= to zeros, ↵Mark Wiebe2011-08-271-0/+2
| | | | empty, and empty_like
* DOC: nditer: Add links to the nditer introductory doc to make it more ↵Mark Wiebe2011-08-251-0/+2
| | | | discoverable
* DOC: datetime: Update the docs to reflect busday_count changeMark Wiebe2011-07-191-3/+1
|
* DOC: datetime: Update docstrings for busdays code.Steve R. Hastings2011-07-191-83/+92
| | | | | | | | | | The previous checkin has examples for working with datetime64 objects and the busdays functions. Edit the docstrings for busdays to harmonize them with the language used in the examples. Instead of saying "business days", now say "valid days". The default valid days are Monday through Friday, business days, but other sets of valid days are possible.
* STY: Fix 'copy' 'copyto' typo and remove some trailing whitespace.Charles Harris2011-07-091-1/+1
|
* ENH: Use np.copyto instead of np.fill in some placesMark Wiebe2011-07-081-5/+0
| | | | | This should allow one to create struct dtype arrays with np.ones and np.zeros_like.
* ENH: core: Add np.copyto, PyArray_MaskedMoveInto, PyArray_MaskedCopyIntoMark Wiebe2011-07-081-1/+52
| | | | | | | | These functions expose masked copying routines, with and without handling of overlapping data. Also deprecated the np.putmask and PyArray_PutMask functions, because np.copyto supercedes their functionality. This will need to be discussed on the list during the pull request review.
* DOC: minor documentation fixesPauli Virtanen2011-06-251-0/+2
|
* DOC: dtype-struct: Document the changes to struct dtypesMark Wiebe2011-06-221-1/+10
|
* DOC: datetime-feedback: Applying Ralf's feedback for the parameter conventionsMark Wiebe2011-06-151-17/+17
|
* STY: datetime-feedback: Rename np.busdaydef -> np.busdaycalendarMark Wiebe2011-06-151-21/+23
| | | | | Also rename the busdaydef parameters to busdaycal parameters. This change was motivated by Chuck's code review feedback.
* DOC: datetime-feedback: Various comment/documentation tweaks from Chuck's ↵Mark Wiebe2011-06-151-4/+6
| | | | review feedback
* DOC: datetime-bday: Document the datetime business day functionsMark Wiebe2011-06-141-0/+262
|
* ENH: core: Rename forcecopy= to copy= in ndarray.astypeMark Wiebe2011-06-011-5/+6
| | | | | This makes it match the parameter in the array constructor with the same meaning.
* ENH: core: Generalize ndarray.astype to take new standard keyword argumentsMark Wiebe2011-05-311-2/+26
| | | | | These include order=, casting=, subok=. Also added a forcecopy= parameter to allow skipping of the copy when possible.
* DOC: Document the new keyword arguments for ufuncsMark Wiebe2011-04-221-2/+9
|
* DOC: Improve the documentation about type promotionMark Wiebe2011-04-221-6/+50
|
* DOC: correct signature and description of ndarray.getfield.Ralf Gommers2011-03-291-35/+20
|
* DOC: Slight improvements to the Python nditer exposureMark Wiebe2011-03-171-19/+66
|
* API: Rename 'niter' to 'nop' in the nditerMark Wiebe2011-03-171-1/+1
| | | | | | This name was chosen partially based on the previous multi-iter, which stored an array of iterators, so 'niter' made sense. In the new nditer, it doesn't, and 'nop' for number of operands seems better.
* DOC: Fill in more of the nditer docsMark Wiebe2011-03-161-29/+100
|
* DOC: document nditer and its methods. Some blanks left to fill in.Ralf Gommers2011-03-161-0/+188
|
* ENH: Add 'subok' parameter to PyArray_NewLikeArray, np.empty_like, ↵Mark Wiebe2011-03-151-1/+5
| | | | | | | np.zeros_like, and np.ones_like This way, the sub-type can be avoided if necessary. This helps mitigate, but doesn't fix, ticket #1753, by allowing "b = np.empty_like(a, subok=False)".
* API: Rename 'coords' to 'multi-index' in ravel_coords and iterator APIMark Wiebe2011-03-141-13/+13
|
* DOC: Add info about iterator, new functions, and C API additions to release ↵Mark Wiebe2011-03-131-2/+2
| | | | notes
* DOC: Revert part of previous commit, moving umath docs did not work.rgommers2011-03-071-0/+247
| | | | | If the ldexp/frexp docs belong in ufunc_docsrtings.py, they need an entry in core/code_generators/generate_umath.py. See #1759.
* DOC: add a few more wiki edits, and move umath docs to correct place.rgommers2011-03-071-247/+0
|
* DOC: merge wiki edit for einsum docstring.rgommers2011-03-031-46/+47
|