summaryrefslogtreecommitdiff
path: root/numpy/lib
Commit message (Collapse)AuthorAgeFilesLines
* TST: document reason for truncate instead of seek past endJulian Taylor2014-01-141-0/+3
|
* BUG: fix large file support on 32 bit systemsJulian Taylor2014-01-112-1/+29
| | | | | | On linux large file support must be enabled and ftello used to avoid overflows. The result must not be converted to a size_t, but a long long.
* TST: fix test failure due to comparing floats with assert_equal.Ralf Gommers2013-12-231-1/+1
| | | | Observed on 32-bit linux with python 3.4b1
* MAINT: don't use open(.., 'U') in Python 3.x, is deprecated.Ralf Gommers2013-12-231-2/+7
| | | | | This is default behavior in 3.x; in 2.x open() doesn't have a `newline` kw. So make code Python-version-specific.
* Merge pull request #4112 from rhewett/meshgrid_singleseberg2013-12-222-28/+33
|\ | | | | ENH: Allow meshgrid to take 1D and 0D inputs
| * ENH: Allow meshgrid to work for 1D and 0D cases.rhewett2013-12-182-28/+33
| |
* | Merge pull request #4102 from seberg/issue-612Charles Harris2013-12-202-9/+21
|\ \ | | | | | | FIX: Array split should not hack empty array shape away
| * | BUG: Fix array_split empty array type and add FutureWarningSebastian Berg2013-12-202-9/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes the result type of empty output arrays. The FutureWarning warns about changed behaviour. A "kludge" was introduced into array split converting converting the result of something like: >>> np.array_split(np.array([[1, 1]]), 2) [array([[1, 1]]), array([], dtype=int64)] instead of retaining the shape of the empty/second array to be (0, 2). A FutureWarning is now raised when such a replacement occurs. Closes gh-612
* | | Avoid overallocating memory in arraypad with user supplied functionJonathan L Long2013-12-171-1/+1
| | | | | | | | | | | | | | | | | | Previously, arraypad used zeros(shape).astype(dtype) instead of zeros(shape, dtype), which could allocate up to eight times more memory than necessary.
* | | MAINT: Change test to read random sized chunksMax Sperlich2013-12-111-13/+9
| | | | | | | | | | | | | | | Speeds the test up vs. reading single bytes at a time, and is now correctly handled when reading the magic string and array header.
* | | MAINT: Introduced _read_array functionMax Sperlich2013-12-112-25/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | This wrapper function is used everywhere in format.py now to ensure to correctly the handle the case when fp.read returns fewer bytes than requested. Also added a test for the orignal bug, loading an array of size more than 64K from a zip file.
* | | MAINT: Better handling of very small chunksMax Sperlich2013-12-092-15/+21
| | | | | | | | | | | | | | | | | | Issue 4093: Improved the handling of the case when the amount of data read by fp.read is smaller than dtype.itemsize. Also changed the test code to make sure this case is tested.
* | | STY: pep8Max Sperlich2013-12-081-5/+11
| | |
* | | TST: Adds test case for Issue 4093Max Sperlich2013-12-082-4/+41
| | |
* | | BUG: Fixes Python3 compatibilityMax Sperlich2013-12-081-1/+1
| | |
* | | BUG: fix loading from compressed .npz (Issue 4093)Max Sperlich2013-12-081-6/+9
| |/ |/| | | | | | | | | In Python 2.6.x the number of bytes read from a zip file is 2^16, which is less than the 2^18 requested by lib.format.py. This change handles the case where fp.read() returns fewer than the requested number of bytes.
* | Correct typo in interp() docstring.Christopher Dembia2013-12-061-1/+1
|/ | | The docstring for interp() contained the grammatically-incorrect text "defaults is". I corrected this to "default is".
* TST: add test for negative axis values in np.insert.Félix Hartmann2013-12-021-0/+7
|
* BUG: Fix np.insert with negative axis.Sebastian Berg2013-12-021-1/+1
| | | | | | | | In some cases a negative axis argument to np.insert would result in wrong behaviour due to np.rollaxis, add modulo operation to avoid this (an error is still raised due to arr.shape[axis]). Closes gh-3494
* TST: Increase test coverage of numpy.save/load roundtripsOlivier Grisel2013-11-261-6/+36
|
* ENH: Use nditer in numpy.save to stream bytes to custom file objectsOlivier Grisel2013-11-261-4/+13
|
* ENH: improve add_newdocs performanceJulian Taylor2013-11-192-5/+14
| | | | | replace slow exec with a direct __import__. improves `import numpy` speed by about 10%.
* Fix typo.Markus Roth2013-11-151-1/+1
|
* DOC: Spelling correction for numpy.diag see alsoChris Kerr2013-11-111-1/+1
|
* DOC: Change pad mode options to a definition listendolith2013-11-101-23/+33
| | | Current formatting is not part of rst, and is not rendering correctly at http://docs.scipy.org/doc/numpy-dev/reference/generated/numpy.pad.html
* TST: improve test_long_str and add documentationJulian Taylor2013-11-091-1/+3
|
* BUG: Fix chunked reading of strings longer than BUFFERSIZELuke Carmichael2013-11-081-1/+1
| | | | | | | This fix correctly calculates the number of BUFFER_SIZE chunks to read. This fix takes into account dtype sizes that could be larger than the BUFFER_SIZE, like a long string. See #4027
* test for failing chunk read of large stringLuke Carmichael2013-11-081-0/+3
|
* When reading file in chunks, buffer_size < dtype.itemsize, ensure at least ↵Luke Carmichael2013-11-081-1/+1
| | | | one read
* MAINT: lib: Use a consistent PEP8-compliant import style in twodim_base.py ↵Warren Weckesser2013-11-022-10/+16
| | | | and tests/test_twodim_base.py. Also make a couple more PEP8 tweaks.
* MAINT: lib: Add a 'See Also' section to the vander docstring, and make a few ↵Warren Weckesser2013-11-021-3/+7
| | | | more PEP8 tweaks.
* MAINT: lib: remove unused imports and PEP8 clean up in twodim_base.pyWarren Weckesser2013-11-021-7/+18
|
* ENH: lib: Rewrite vander: make it faster, and add an option to specify the ↵Warren Weckesser2013-11-022-15/+69
| | | | order of the powers (either decreasing or increasing).
* MAINT: Don't use 'import *' in lib/test_twodim_base.py.Warren Weckesser2013-11-021-1/+3
|
* MAINT: io: handle a bad fmt argument in savetxt by raising a ValueError.Warren Weckesser2013-10-202-0/+6
|
* BUG: cov/corrcoef complex input and empty arraysJoseph Martinot-Lagarde2013-10-162-27/+71
| | | | | | | | | | | | | | | | | This preserves the complex (and higher precision float or object) type of the input array, so that the complex covariance and correlation coefficients can be calculated. It also fixes the the behaviour of empty arrays. These will now either result in a 0x0 result, or a NxN result filled with NaNs. A warning is now issued when ddof is too large and the factor set to 0 so that in this case the result is always NaN or infinity/negative infinity and never a negative number. Closes gh-597 and gh-2680 Closes gh-3882 (original pull request)
* BUG: close file-like objects returned by urlopencgohlke2013-10-151-0/+2
| | | Fix `ResourceWarning: unclosed file` on Python 3
* Merge pull request #3820 from juliantaylor/microoptCharles Harris2013-10-142-1/+2
|\ | | | | A couple micro optimizations
| * TST: improve test speedJulian Taylor2013-09-282-1/+2
| | | | | | | | | | | | | | move slow test_memmap_roundtrip to slow tests decrease excessively large array size used in np.sin(x) compuation TestInterp.test_if_len_x_is_small, the code has no special path for this large size differences.
* | Merge pull request #3862 from juliantaylor/null-freenjsmith2013-10-111-12/+4
|\ \ | | | | | | MAINT: accept NULL in NpyIter_Deallocate and remove redundant NULL checks
| * | MAINT: accept NULL in NpyIter_Deallocate and remove redundant NULL checksJulian Taylor2013-10-031-12/+4
| | | | | | | | | | | | | | | | | | | | | | | | Deallocation should just do nothing if provided a NULL pointer nditer deletion broke this convention. Removed many redundant NULL checks for various deallocation functions used in numpy, they all end up in standard C free or PyMem_Free which are both NULL safe.
* | | Merge pull request #3829 from jarondl/pep8-npyioCharles Harris2013-10-101-59/+53
|\ \ \ | | | | | | | | STY: pep8 for npyio
| * | | STY: pepe8 for npyio continued 2 (typo)Yaron de Leeuw2013-10-111-1/+1
| | | | | | | | | | | | | | | | fixing one typo in npyio.py
| * | | STY: pep8 for npyio continuedYaron de Leeuw2013-10-061-7/+4
| | | | | | | | | | | | | | | | Two slight style modifications in npyio, regarding line length.
| * | | STY: pep8 for npyioYaron de Leeuw2013-09-291-60/+57
| | | | | | | | | | | | | | | | | | | | | | | | Various pep8 fixes for npyio.py Also reorganized the imports, and removed the unnecessary (I hope) `_string_like = _is_string_like` statement.
* | | | TST: Raise AssertionError on failureJoseph Martinot-Lagarde2013-10-101-0/+2
| | | |
* | | | TST: Regression test for gh-2561Joseph Martinot-Lagarde2013-10-091-0/+14
| | | |
* | | | BUG: Disable check for oldstyle classes in python3Joseph Martinot-Lagarde2013-10-091-1/+4
| | | | | | | | | | | | | | | | Fixes gh-2561
* | | | Merge pull request #3769 from juliantaylor/percentile-compatseberg2013-10-052-24/+182
|\ \ \ \ | | | | | | | | | | BUG: ensure percentile has same output structure as in 1.8
| * | | | BUG: ensure percentile has same output structure as in 1.8Julian Taylor2013-10-042-24/+182
| | |/ / | |/| | | | | | | | | | | | | | | | | | percentile returned scalars and lists of arrays in 1.8 adapt new percentile to return scalar and arrays with q dimension first for compatibility.