summaryrefslogtreecommitdiff
path: root/numpy
Commit message (Collapse)AuthorAgeFilesLines
* 2to3: Apply `raise` fixes. Closes #3077.Charles Harris2013-03-019-23/+23
| | | | | | | | | | Replaces the raise Exception, msg: form with raise Exception(msg):
* Merge pull request #3097 from charris/2to3-sys_excnjsmith2013-03-012-4/+4
|\ | | | | 2to3: Apply `sys_exc` fixes. Closes #3086.
| * 2to3: Apply `sys_exc` fixes. Closes #3086.Charles Harris2013-02-282-4/+4
| | | | | | | | | | This uses sys.exc_info in place of sys.exc_value. The new function goes back to at least 2002, so should be safe.
* | Merge pull request #2967 from sbyrnes321/masterCharles Harris2013-02-282-0/+34
|\ \ | | | | | | DOC -- add another paragraph note to ndarray.view docs
| * | DOC: Add example showing how a view of a slice can misbehaveSteve2013-02-051-0/+16
| | |
| * | DOC -- add another paragraph note to ndarray.view docs (cont'd)Steve2013-02-052-11/+17
| | | | | | | | | | | | | | | More detail: Views are only sensitive to under-the-hood storage when the dtype storage size has changed.
| * | DOC -- add another paragraph note to ndarray.view docsSteve2013-02-042-0/+12
| | | | | | | | | | | | | | | | | | | | | Since most numpy operations are not sensitive to underlying data structure (C-ordered arrays vs fortran-ordered arrays, versus slices or transposes of arrays, etc.), but structured-array views ARE sensitive to that, it is worth saying it explicitly in the documentation.
* | | Merge pull request #2988 from ewmoore/methdot2697Charles Harris2013-02-282-5/+21
|\ \ \ | | | | | | | | BUG: gh-2687 make multiarray dot method accept out array and keyword args
| * | | BUG: use the PyUString_FromString macro for Py3 compat instead.Eric Moore2013-02-151-1/+1
| | | |
| * | | BUG: PyString_FromString isn't py3 compatible.Eric Moore2013-02-151-1/+1
| | | | | | | | | | | | | | | | Use PyUnicode_FromString instead.
| * | | FIX: use PyObject_CallMethodObjArgs in array_dotEric Moore2013-02-152-4/+9
| | | | | | | | | | | | | | | | and make added comments in test_multiarray.py helpful.
| * | | BUG: gh-2687 make multiarray dot method accept out array and keywordEric Moore2013-02-142-5/+16
| | | | | | | | | | | | | | | | args.
* | | | Merge pull request #3047 from charris/2to3-callablenjsmith2013-02-285-8/+13
|\ \ \ \ | | | | | | | | | | 2to3: Fix callable.
| * | | | 2to3: Fix callable.Charles Harris2013-02-285-8/+13
| | |_|/ | |/| |
* | | | Merge pull request #3059 from charris/2to3-funcattrsnjsmith2013-02-286-12/+12
|\ \ \ \ | | | | | | | | | | 2to3: Apply `funcattrs` fixer. Closes #3058.
| * | | | 2to3: Apply `funcattrs` fixer. Closes #3058.Charles Harris2013-02-286-12/+12
| |/ / / | | | | | | | | | | | | | | | | This replaces the `b.func_xxxx` with newer `__xxxx__` attribute names For example, `f.__name__` replaces `f.func_name`
* | | | 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
| | |