summaryrefslogtreecommitdiff
path: root/numpy/lib/twodim_base.py
Commit message (Collapse)AuthorAgeFilesLines
* DOC: fix some minor issues with histogram2d docstring formatting.Ralf Gommers2013-08-111-9/+19
|
* DOC: update example of histogram2d to doctest format.Frank Breitling2013-08-111-31/+30
|
* Merge pull request #3531 from fkbreitl/masternjsmith2013-07-181-15/+45
|\ | | | | Updated documentation for histogram2d() in twodim_base.py according to discussion
| * Update twodim_base.pyFrank Breitling2013-07-171-1/+1
| |
| * Update twodim_base.pyFrank Breitling2013-07-131-33/+44
| |
| * Fixed two typos.Frank B2013-02-051-2/+2
| |
| * Added example for 2D-histogram with variable bin size.Frank B2013-02-051-2/+21
| |
* | 2to3: Apply `print` fixer.Charles Harris2013-04-061-1/+1
| | | | | | | | | | | | | | Add `print_function` to all `from __future__ import ...` statements and use the python3 print function syntax everywhere. Closes #3078.
* | 2to3: Use absolute imports.Charles Harris2013-03-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The new import `absolute_import` is added the `from __future__ import` statement and The 2to3 `import` fixer is run to make the imports compatible. There are several things that need to be dealt with to make this work. 1) Files meant to be run as scripts run in a different environment than files imported as part of a package, and so changes to those files need to be skipped. The affected script files are: * all setup.py files * numpy/core/code_generators/generate_umath.py * numpy/core/code_generators/generate_numpy_api.py * numpy/core/code_generators/generate_ufunc_api.py 2) Some imported modules are not available as they are created during the build process and consequently 2to3 is unable to handle them correctly. Files that import those modules need a bit of extra work. The affected files are: * core/__init__.py, * core/numeric.py, * core/_internal.py, * core/arrayprint.py, * core/fromnumeric.py, * numpy/__init__.py, * lib/npyio.py, * lib/function_base.py, * fft/fftpack.py, * random/__init__.py Closes #3172
* | 2to3: Put `from __future__ import division in every python file.Charles Harris2013-03-011-0/+1
|/ | | | | | | | This should be harmless, as we already are division clean. However, placement of this import takes some care. In the future a script can be used to append new features without worry, at least until such time as it exceeds a single line. Having that ability will make it easier to deal with absolute imports and printing updates.
* DOC: Further tweaks to histogram2d docstring.Stefan van der Walt2012-11-261-9/+11
|
* Remove maskna API from ndarray, and all (and only) the code supporting itNathaniel J. Smith2012-06-161-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Document the PyArray_Diagonal transition scheme.Nathaniel J. Smith2012-05-161-2/+5
|
* Transition scheme for allowing PyArray_Diagonal to return a viewNathaniel J. Smith2012-05-161-1/+7
| | | | | | | | | | | | | | | | PyArray_Diagonal is changed to return a copy of the diagonal (as in numpy 1.6 and earlier), but with a new (hidden) WARN_ON_WRITE flag set. Writes to this array (or views thereof) will continue to work as normal, but the first write will trigger a DeprecationWarning. We also issue this warning if someone extracts a non-numpy writeable view of the array (e.g., by accessing the Python-level .data attribute). There are likely still places where the data buffer is exposed that I've missed -- review welcome! New known-fail test: eye() for maskna arrays was only implemented by exploiting ndarray.diagonal's view-ness, so it is now unimplemented again, and the corresponding test is marked known-fail.
* DOC: merge wiki doc edits.Ralf Gommers2012-03-031-9/+14
|
* FIX: Make tril/triu return the same dtype as the original array.Fabian Pedregosa2011-08-311-2/+2
| | | | | | | This should fix: * http://projects.scipy.org/numpy/ticket/1848 * http://projects.scipy.org/scipy/ticket/1449
* ENH: missingdata: Add maskna= flag to np.eye constructorMark Wiebe2011-08-271-10/+6
|
* ENH: missingdata: Add NA support to np.diagonal, change np.diagonal to ↵Mark Wiebe2011-08-271-11/+4
| | | | always return a view
* WHT: Cleanup trailing whitespace.Charles Harris2011-04-021-1/+0
|
* BUG: Fix ticket #1579. Do some cleanups.Charles Harris2010-08-101-40/+51
|
* DOC: wiki merge, twodim_base and a few loose ones.rgommers2010-07-311-31/+33
|
* DOC - fix doc errorMatthew Brett2010-03-111-1/+1
|
* fixed a whole bunch of doctestsPaul Ivanov2009-12-281-2/+2
|
* Docstring update: libPauli Virtanen2009-10-021-72/+126
|
* Docstring updates, part 1Pauli Virtanen2009-10-021-49/+74
|
* Address #1167: faster twodim_base.diag/eye implementation by Luca Citi + testsPauli Virtanen2009-07-121-21/+26
|
* Fix versioning and inclusion to ref. guide in docs for #1132Pauli Virtanen2009-07-041-0/+20
|
* Add indexing functions by Fernando Perez.Stefan van der Walt2009-07-041-2/+214
|
* Merge from the doc wikiPauli Virtanen2009-03-241-9/+36
|
* Import documentation from doc wiki (part 2, work-in-progress docstrings, but ↵Pauli Virtanen2008-10-281-15/+15
| | | | they are still an improvement)
* Import documentation from doc wiki (part 1)Pauli Virtanen2008-10-271-2/+2
|
* Removed unused imports.Alan McIntyre2008-09-181-1/+1
|
* Merge from documentation editor.Stefan van der Walt2008-08-051-56/+391
|
* Use the implicit "import numpy as np" made available to all doctests instead Alan McIntyre2008-07-051-4/+4
| | | | | of explicit imports or dependency on the local scope where the doctest is defined..
* ran reindent in preparation for the 1.1 releaseJarrod Millman2008-04-201-6/+6
|
* Fix vander docstring.Stefan van der Walt2008-04-091-4/+3
|
* added docstring to diagflat.dhuard2008-03-201-0/+16
|
* ran reindent.py to clean up whitespaceJarrod Millman2007-10-291-8/+8
|
* Fix tri when dtype is bool (closes ticket #574).Stefan van der Walt2007-09-301-2/+1
|
* Fix so that rot90 only works on first two axes.Travis Oliphant2007-09-201-2/+2
|
* Make sure we always return a value from eye(). It wasn't returning a value ↵Robert Kern2007-07-251-1/+2
| | | | when dtype==bool.
* Add patch in Ticket #189 for histogramdd. Fixes bug reported by Ben GranettTravis Oliphant2007-04-021-92/+29
|
* clean up unused imports and bad whitespaceTim Leslie2007-01-091-1/+1
|
* Whitespace cleanup.Stefan van der Walt2007-01-081-21/+21
|
* Fix ticket #188 by returning the name of the dtype objects for data-type ↵Travis Oliphant2006-09-161-2/+1
| | | | objects without fields or sub-arrays that are in correct byte-order
* Add histogramnd and fix histogram2dTravis Oliphant2006-09-141-29/+54
|
* Add diagflat. Begin to add numarray compatibilityTravis Oliphant2006-08-021-2/+21
|
* Fixed a memory-leak in EnsureArray. Added __array_priority__ to array ↵Travis Oliphant2006-07-201-14/+10
| | | | scalars. Added bug-fixes part of david huard's histogramdd ticket.
* Improve c_numpy.pxd a bit. Re-name get_numpy_include() to get_include() and ↵Travis Oliphant2006-07-011-1/+1
| | | | deprecate old name. Add PyArray_ZEROS and PyArray_EMPTY macros which take type-number instead of data-type object.
* Adjust histogram2d a bit. Fix doc for logspace.Travis Oliphant2006-07-011-4/+15
|