summaryrefslogtreecommitdiff
path: root/numpy/lib
Commit message (Collapse)AuthorAgeFilesLines
...
* | BUG: Fix zero divide warning in financial.pmt.Fei Liu2015-02-172-2/+10
| | | | | | | | | | | | | | | | | | The pmt function in financial.py does a zero divide when rate=0 because error because the alternatives in np.where() are evaluated befor the selection is made.first before going into the function however, the denominator can be zero at that time. Closes #4701.
* | Merge pull request #5502 from jaimefrio/in1d_unorderCharles Harris2015-02-131-3/+4
|\ \ | | | | | | ENH: speed-up in1d replacing sorting with fancy indexing
| * | ENH: speed-up in1d replacing sorting with fancy indexingjaimefrio2015-01-251-3/+4
| | |
* | | TST: Make loadtxt able to load floats as hex strings.Charles Harris2015-02-131-0/+13
| | | | | | | | | | | | The strings must be produced by the python float.hex method.
* | | ENH: Add support for float hex format to loadtxt.Chris Laumann2015-02-131-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | Add _floatconv to npyio.py as a default floating point converter. This uses float() as a type conversion with a fallback on (ValueError) to float.fromhex(). Closes #2517.
* | | DOC: Updated docstring for histogram2d as suggested in issue #5538Åsmund Hjulstad2015-02-132-3/+36
| | | | | | | | | | | | Also, added unittest for [int, array] combination arguments
* | | Fix 'dimensions' typo in numpy.kron() help messageSandro Tosi2015-02-061-1/+1
|/ / | | | | | | This bug was reported in Debian as: http://bugs.debian.org/777172 .
* | Merge pull request #5495 from charris/cleanup-gh-4649Charles Harris2015-01-244-7/+40
|\ \ | | | | | | BUG: Fix genfromtext NameValidator arguments passed to easy_dtype.
| * | MAINT: Make argument determination in NameValidator more precise.Charles Harris2015-01-232-4/+9
| | | | | | | | | | | | | | | | | | | | | The function was useing `'u' in case_sensitive` to detect `upper`. Make that more precise with `case_sensitive.startswith('u'). Raise ValueError if case_sensitive has unrecognized value.
| * | TST: Fix bug in test_dtype_with_converters_and_usecols.Charles Harris2015-01-231-2/+2
| | | | | | | | | | | | | | | | | | | | | The case_sensitive argument to np.recfromcsv has a default value of 'lower'. That value was not previously correctly passed on, but is now, so the previous expected values in this test were incorrectly upper cased.
| * | BUG: Fix genfromtext NameValidator arguments passed to easy_dtype.Alan Briolat2015-01-232-1/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | np.genfromtxt validates field names twice: once in genfromtxt and once in easy_dtype. Whilst the arguments to genfromtxt are used in the first validation, they aren't passed to easy_dtype (which is used only when dtype != None) and therefore in this case the default validation (strip non-alphanum, replace spaces) gets confusingly applied, ignoring genfromtxt's arguments. This patch adds fixes genfromtxt by passing the appropriate arguments onwards to easy_dtype. That is probably the least invasive way to fix the issue.
* | | Merge pull request #5496 from charris/cleanup-gh-5103Charles Harris2015-01-242-3/+75
|\ \ \ | | | | | | | | ENH:Add keyword max_rows to genfromtxt.
| * | | ENH: genfromtxt: Change 'nrows' to 'max_rows'.Warren Weckesser2015-01-232-30/+57
| | | |
| * | | ENH:Add keyword nrows to genfromtxt.styr2015-01-232-1/+46
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows one to specify the maximum number of row processed in in a call. The new functionality allows for reading more complex data formats. For instance, multiple calls can be used to read in multiple arrays stored in a single file. Closes #5084. Closes #5093.
* | | MAINT: bring back np.lib testsjaimefrio2015-01-231-0/+12
| | |
* | | Merge pull request #5476 from juliantaylor/merge-cbaseJaime2015-01-237-1755/+5
|\ \ \ | |/ / |/| | merge _compiled_base module into multiarray
| * | MAINT: merge _compiled_base module into multiarrayJulian Taylor2015-01-227-1755/+5
| | | | | | | | | | | | Allows access to internal functions for the file.
* | | TST: Add test for loadtxt with None as string type.Charles Harris2015-01-231-0/+8
| | |
* | | BUG: Fix loadtxt with comments=None and a string None data.Leonardo Donelli2015-01-231-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | Current loadtxt with `comments=None` considers the string `'None'` as a comment symbol. Fixed by making split_line method check if comments is None. Closes #5155.
* | | DOC: improve record/structured array nomenclature & guideAllan Haldane2015-01-221-2/+2
|/ / | | | | | | | | | | | | | | | | | | | | This update adds a section better describing record arrays in the user guide (numpy/doc/structured_arrays.py). It also corrects nomenclature, such that "structured array" refers to ndarrays with structured dtype, "record array" refers to modified ndarrays as created by np.rec.array, and "recarray" refers to ndarrays viewed as np.recarray. See the note at the end of the structured array user guide.
* | Merge pull request #5361 from JDWarner/arraypad_fixesCharles Harris2015-01-132-65/+574
|\ \ | | | | | | ENH: Improve arg handling & enhance test suite for `np.pad`
| * | ENH: Improve arg handling & enhance test suite for np.padJosh Warner (Mac)2015-01-062-65/+574
| | |
* | | Merge pull request #5421 from charris/special-case-matrixCharles Harris2015-01-061-2/+2
|\ \ \ | | | | | | | | Special case matrix
| * | | BUG: Make diag, diagonal return 1-D arrays for matrix arguments.Charles Harris2015-01-041-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is an ugly hack to preserve backwards compatibility for code that uses matrices. It is needed since both diag and diagonal have been changed to preserve subtypes otherwise. Note that a.diagonal() still returns matrices when a is a matrix.
* | | | Merge pull request #5418 from shoyer/nanprodCharles Harris2015-01-052-149/+157
|\ \ \ \ | | | | | | | | | | ENH: add np.nanprod
| * | | | ENH: add np.nanprodStephan Hoyer2015-01-052-149/+157
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This PR adds an implementation of `nanprod`. The actual function is a two-liner adapted from `nansum`. Most of this PR consists of documentation and tests (for which I took the opportunity to do some consolidation). A method with the same functionality exists in pandas, and I was surprised to discover that it's not in numpy.
* | | | DOC: update npy-format NEP and lib/format.py with version 2.0 description.Ralf Gommers2015-01-041-0/+13
| |/ / |/| | | | | | | | As discussed on gh-5413. Version 2.0 was added in gh-4765.
* | | DOC: link to the npy-format NEP in numpy.npyio docs. Closes gh-4523.Ralf Gommers2015-01-021-2/+5
| | | | | | | | | | | | [ci skip]
* | | remove trailing whitespaceValentin Haenel2014-12-271-2/+2
|/ /
* | Merge pull request #5368 from tacaswell/sundry_doc_changesRalf Gommers2014-12-134-16/+16
|\ \ | | | | | | Cleanups in documentation formatting.
| * | DOC : optional parenthesisThomas A Caswell2014-12-121-1/+1
| | |
| * | DOC : do not abuse enum markupThomas A Caswell2014-12-122-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | - {ndarray, bool} -> ndarray or bool - {int, array of ints} -> int or array of ints - {str, function} -> str or function - {sequnce, int} -> sequence or int - {array_like, poly1d} -> array_like or poly1d - {None, list of `m` scalars, scalar} -> list of `m` scalars or scalar
| * | DOC : move shape to front to match rest of docsThomas A Caswell2014-12-121-4/+4
| | |
| * | DOC : do not abuse enumeration for return typesThomas A Caswell2014-12-121-4/+4
| | | | | | | | | | | | | | | change '{ndarray, float}' -> 'ndarray or float' as {} are for when the value is an enumeration
* | | Merge pull request #5358 from Garrett-R/fix_bug_2015Charles Harris2014-12-121-1/+3
|\ \ \ | | | | | | | | Fix #2015: diag returns ndarray instead of matrix
| * | | Improved PEP-8 complianceGarrett-R2014-12-081-0/+2
| | | |
| * | | BUG: Closes #2015: diag returns ndarrayGarrett-R2014-12-081-1/+1
| |/ / | | | | | | | | | | | | | | | | | | If x is a matrix, np.diag(x) and np.diagonal(x) now return matrices instead of arrays. Both of these cause x.diagonal() to be called. That means they return row vectors (just like x.flatten(), x.ravel(), x.cumprod(), etc.)
* | | DOC: Give a more explicit reference to the .npy format documentation in the ↵Warren Weckesser2014-12-121-1/+2
|/ / | | | | | | 'save' docstring.
* | BUG: digitize segfaults on TypeErrorjaimefrio2014-12-072-2/+9
| | | | | | | | | | The new searchsorted-based digitize introduced in #5101 segfaults when it should raise a TypeError.
* | Change pronoun in doc string from "his" to gender-neutral "their"Bob Poekert2014-12-051-1/+1
| |
* | Merge pull request #5319 from larsmans/c-fixesCharles Harris2014-12-022-136/+195
|\ \ | | | | | | MAINT: refactor packbits/unpackbits
| * | ENH ensure np.packbits works on np.bool dtypeLars Buitinck2014-11-302-8/+12
| | |
| * | MAINT/TST: refactor and test packbits/unpackbitsLars Buitinck2014-11-302-136/+191
| | | | | | | | | | | | | | | | | | Pushes the GIL release one loop outward. First test for these functions (!). Incorporates suggestions by @jaimefrio and @charris.
* | | Merge pull request #5327 from madawilliams/savetxtCharles Harris2014-11-301-1/+6
|\ \ \ | | | | | | | | ENH: More explicit error message for np.savetxt
| * | | ENH: More explicit error message for np.savetxtAdam Williams2014-11-301-1/+6
| |/ /
* | | BUG: Closes #2917: numpy.lib._iotools.StringConverter.upgrade returnGarrett-R2014-11-302-9/+17
|/ / | | | | | | numpy.lib._iotools.StringConverter.upgrade should have a return value
* | TEST: added test of BagObjWendell Smith2014-11-181-0/+11
| |
* | ENH: add BagObj.__dir__ to numpy.lib.npyioWendell Smith2014-11-181-0/+8
| | | | | | | | | | This allows dir(bagobj), and also enables tab-completion on a BagObj, which can be useful in an interpreter or IPython
* | Merge pull request #5214 from mkowoods/np.averageJulian Taylor2014-10-272-3/+7
|\ \ | | | | | | | | | Update to average calculation
| * | BUG: upcast weights to average result type to avoid inaccuraciesMalik Woods2014-10-272-3/+7
| | | | | | | | | | | | closes gh-5202