summaryrefslogtreecommitdiff
path: root/numpy
Commit message (Collapse)AuthorAgeFilesLines
* 2to3: apply exec fixer results.Charles Harris2013-02-2812-14/+14
| | | | This changes the `exec` command to the `exec` function.
* Merge pull request #2950 from seberg/issue-2949njsmith2013-02-282-3/+37
|\ | | | | BUG: Fix strides of trailing 1s when reshaping
| * BUG: Fix strides of trailing 1s when reshapingSebastian Berg2013-01-252-3/+37
| | | | | | | | | | | | | | | | | | When adding ones to the shape for non contiguous arrays reshapes (i.e. either the first array is not contiguous or the the reshape order does not match it). The strides of trailing ones were not set. For example reshape of (6,) to (6,1,1). Previously this occured rarely because of removed special handleing when only ones were added or removed.
* | Merge pull request #2943 from rgommers/bento-ini-filesRalf Gommers2013-02-271-0/+24
|\ \ | | | | | | BUG: npy-pkg-config ini files were missing after Bento build.
| * | BUG: npy-pkg-config ini files were missing after Bento build.Ralf Gommers2013-01-221-0/+24
| | |
* | | Merge pull request #3020 from charris/2to3-remove-has_keyseberg2013-02-271-4/+4
|\ \ \ | | | | | | | | 2to3: Change use 'has_key' to 'key in'.
| * | | 2to3: Change use 'has_key' to 'key in'.Charles Harris2013-02-261-4/+4
| | | | | | | | | | | | | | | | Part of the 2to3 project.
* | | | Merge pull request #3023 from charris/2to3-exceptseberg2013-02-2726-55/+55
|\ \ \ \ | | | | | | | | | | 2to3: Use modern exception syntax.
| * | | | 2to3: Use modern exception syntax.Charles Harris2013-02-2626-55/+55
| |/ / / | | | | | | | | | | | | Example: except ValueError,msg: -> except ValueError as msg:
* | | | Merge pull request #3002 from seberg/issue-3001Charles Harris2013-02-244-46/+126
|\ \ \ \ | |/ / / |/| | | BUG: Incref items in np.take on error as they are decrefed later
| * | | BUG: non-empty takes on empty axes failed for clip/wrap logicSebastian Berg2013-02-252-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | These did no checking for this special case. And thus, wrap would go into infinite loops trying to adjust the index, and clip would (probably) segfault. This raises IndexError explicitely beforehand.
| * | | TST: Add test for np.take refcountingSebastian Berg2013-02-251-38/+56
| | | | | | | | | | | | | | | | Also make the testcase for take a class.
| * | | BUG: Incref items in np.take on error as they are decrefed laterSebastian Berg2013-02-253-14/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When take fails during copying due to out of bound indices, then the already copied items will be decref'd on array destruction. To avoid that, as well as possible overlapping or already initialized object arrays, decref and incref during the copy operation itself. Note that all basic types but object use their own fasttake, so this does not change anything for them.
* | | | Added 'subok' keyword documentation to zeros_like and ones_likedaveydave4002013-02-221-0/+8
| | | | | | | | | | | | | | | | functions.
* | | | Merge pull request #3006 from seberg/fix-empty-itemCharles Harris2013-02-202-0/+6
|\ \ \ \ | | | | | | | | | | BUG: Fix regression of bad error/random behavior in item method
| * | | | BUG: Fix regression of bad error/random behavior in item methodSebastian Berg2013-02-202-0/+6
| |/ / / | | | | | | | | | | | | | | | | Appearently .item() for arrays with size != 1 correctly returned an error in 1.6., but failed to raise the error (due to missing return) in 1.7.
* | | | Update numpy/lib/function_base.pyAndreas Hilboll2013-02-171-1/+1
|/ / / | | | | | | fix percentile docstring
* | | Merge pull request #2974 from seberg/issue-427Charles Harris2013-02-122-14/+36
|\ \ \ | | | | | | | | Fix some large array sorts and memory error handling
| * | | BUG: Fix reporting of memory error inside sortingSebastian Berg2013-02-102-6/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PyDataMem_NEW was not checked for error and the occurance of errors not returned correctly in new_sort. Also for PyArray_LexSort and new_argsort it should now raise MemoryError correctly. This is done by setting PyErr_NoMemory() when no error is already present, as the low level sorting can only fail for this reason.
| * | | BUG: Fix dtypes in sorting functions to npy_intpSebastian Berg2013-02-101-8/+8
| | | | | | | | | | | | | | | | | | | | Some of the iteration variables were int, causing sorts to fail for large arrays. Fixes github issue 427.
* | | | Merge pull request #2979 from charris/fix-nansumseberg2013-02-122-1/+12
|\ \ \ \ | | | | | | | | | | BUG: Make nansum work with booleans.
| * | | | BUG: Make nansum work with booleans.Charles Harris2013-02-122-1/+12
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | This broke when function_base._nannop tried to fill a boolean array with integer zeros, raising a 'safe_casting' error. It looks like nanargmax and nanargmin would also break, and were probably incorrect for booleans in any case. The fix is not to use fill values for boolean and integer dtypes. Previously that was only done for the integer dtypes.
* | | | Merge pull request #2975 from bfroehle/tp_allocnjsmith2013-02-101-1/+1
|\ \ \ \ | | | | | | | | | | ENH: Use tp_basicsize, not NPY_SIZEOF_PYARRAYOBJECT, for allocation
| * | | | ENH: Use tp_basicsize, not NPY_SIZEOF_PYARRAYOBJECT, for memory allocation.Bradley M. Froehle2013-02-101-1/+1
| |/ / / | | | | | | | | | | | | | | | | | | | | This change allows C-API level subtypes of PyArray_Type without forcing the developer to rewrite the tp_alloc function and only change the amount of memory allocated.
* | | | BUG: PyArray_LexSort allocates too much temporary memory.Bradley M. Froehle2013-02-101-2/+2
|/ / / | | | | | | | | | | | | | | | PyArray_LexSort was allocating memory to hold actual PyArrayObject's and PyArrayIterObject's, but only storing pointers to such objects in the array.
* | | Merge pull request #2947 from charris/fix-complex-polynomial-fitCharles Harris2013-02-0412-12/+73
|\ \ \ | | | | | | | | Fix complex polynomial fit
| * | | MAINT: Use a better method to detect complex arrays.Charles Harris2013-01-246-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of if lhs.dtype.char in np.typecodes['Complex']: use if issubclass(lhs.dtype.type, np.complexfloating):
| * | | TST: Add Test for column scaling in the polynomial package fits.Charles Harris2013-01-236-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | The test uses the complex set of sample points [1, 1j, -1, -1j] whose squared sum is exactly zero. This would fail before the column scaling was fixed.
| * | | BUG: gh-2790, fix column scaling in polynomial package least squares.Charles Harris2013-01-236-12/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The columns should be scaled using their 2-norm, but in the complex case that was being incorrectly computed as the square root of the sum of the squared elements rather than as the square root of the sum of their squared real and imaginary parts.
* | | | DOC/FIX: fix example in ctypeslib module documentationValentin Haenel2013-02-011-2/+2
| |_|/ |/| | | | | | | | | | | | | | Fix some inconsistencies in the example. The library is loaded as '_lib' not 'lib' in the rest of the example. Also, the function is called 'foo_func' not 'foo'
* | | FEAT: use separate build by default.David Cournapeau2013-01-242-2/+2
| | |
* | | REF: make the separate compilation env handling a tad simpler.David Cournapeau2013-01-242-10/+2
| | |
* | | Merge pull request #2940 from ContinuumIO/ndindex_fix_moreTravis E. Oliphant2013-01-232-1/+7
|\ \ \ | |/ / |/| | BUG: Fix logic in ndindex to match __init__ method. Fixes bug in ndindex((3,))
| * | TST: Add a test for ndindex call.Travis E. Oliphant2013-01-211-0/+4
| | |
| * | Fix-up logic for checking for zero-d arrays.Travis E. Oliphant2013-01-211-1/+3
| |/
* | Merge pull request #2725 from seberg/take_0dseberg2013-01-233-3/+53
|\ \ | |/ |/| ENH: Allow 0-d indexes in np.take
| * ENH: Allow 0-d indexes in np.takeSebastian Berg2013-01-063-3/+53
| | | | | | | | | | | | | | The TakeFrom already supported this. This removes the check which made it not possible and adds some tests for take. Also add documentation and information to the release notes.
* | BUG: fix separate compilation mode for bento build.David Cournapeau2013-01-211-4/+16
| |
* | BUG: fix inclusion of private hader in #d2122ea1f458e9429b692111238f7b9f4a852db2David Cournapeau2013-01-211-1/+1
| |
* | TST: Add test for printing of scalar values.Charles Harris2013-01-201-0/+29
| |
* | BUG: gh-2935, fix printing of scalar float -0.0.Charles Harris2013-01-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The issue was that the string value of scalar floating types equal to -0.0 lacked a trailing ".0". >>> print np.float64(-0.0) -0 The problem resulted from using val < 0 to check for a leading negative sign. That expression evaluates false when val = -0.0, and the need to append ".0" was not detected.
* | Merge pull request #2933 from seberg/result_type-segfaultCharles Harris2013-01-192-1/+2
|\ \ | | | | | | BUG: Fix segfault in np.result_type for None input.
| * | BUG: Fix segfault in np.result_type for None input.Sebastian Berg2013-01-192-1/+2
| | | | | | | | | | | | | | | Makes behavior identical to np.dtype(None), which fits to how the function works.
* | | BUG: Fix memory leak in ndarray construction from strings (gh-2927)Mark Wiebe2013-01-171-1/+5
|/ /
* | Merge pull request #2914 from charris/remove-scons-supportCharles Harris2013-01-1533-2125/+3
|\ \ | | | | | | Remove scons support
| * | DEP: Remove more references to scons related files.Charles Harris2013-01-141-2/+0
| | | | | | | | | | | | | | | | | | | | | These references were in MANIFEST.in, doc/summarize.py, release.sh, and numpy/testing/noseclasses.py and involved scons files that have been removed, mostly setupscons.py and setupsconsegg.py that were in the top level.
| * | DEP: Remove scons related files and code.Charles Harris2013-01-1332-2123/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | This removes files and code supporting scons builds. After this change numpy will only support builds using distutils or bento. The removal of scons has been discussed on the list several times and a decision has been made that scons support is no longer needed. This was originally discussed for numpy 1.7 and because the distutils and bento methods are still available we are skipping the usual deprecation period.
* | | Merge pull request #2897 from ContinuumIO/ndindex_fixnjsmith2013-01-154-7/+41
|\ \ \ | | | | | | | | Fix for #2895 ndindex failing
| * | | Fix 0-d ndincr to have correct return value.Travis E. Oliphant2013-01-111-1/+1
| | | |
| * | | Fix the test for numpy.ndindex()Travis E. Oliphant2013-01-112-5/+24
| | | | | | | | | | | | | | | | | | | | Fix ndindex for 0-d arrays. Add tests for tuple arguments to ndindex