summaryrefslogtreecommitdiff
path: root/numpy
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #5616 from juliantaylor/backport-1.9.2Julian Taylor2015-03-014-3/+27
|\ | | | | more backports for 1.9.2
| * BUG: solves complex array clip in issue #5354 and added symmetric regression ↵Maniteja Nandana2015-02-282-2/+12
| | | | | | | | test
| * BUG: Fixes #5524 and adds testhannaro2015-02-282-1/+15
| | | | | | | | | | argpartition does not fail anymore on non-ndarray array-likes. Fix as implemented by @maniteja123.
* | Merge pull request #5619 from jaimefrio/unique_docstringJulian Taylor2015-03-011-3/+4
|\ \ | | | | | | | | | DOC: Describe return_counts keyword in np.unique docstring
| * | DOC: Describe return_counts keyword in np.unique docstringJaime Fernandez2015-03-011-3/+4
| | |
* | | Merge pull request #5618 from johntyree/arrfill_ulonglongJulian Taylor2015-03-012-8/+33
|\ \ \ | |/ / | | / | |/ |/| BUG: Fixes ndarray.fill to accept maximum uint64 value
| * BUG: arr.fill() should accept the max uint64 valueJohn Tyree2015-02-282-8/+33
| |
* | Merge pull request #5599 from pitrou/refleak_ufunc2Julian Taylor2015-02-231-2/+0
|\ \ | |/ | | | | BUG: Fix a reference leak in ufunc type resolution.
| * BUG: Fix a reference leak in ufunc type resolution.Antoine Pitrou2015-02-231-2/+0
| | | | | | | | ensure_dtype_nbo() already creates a new reference.
* | Merge pull request #5500 from juliantaylor/backports-1.9.2Julian Taylor2015-02-018-25/+57
|\ \ | | | | | | some backports for 1.9.2
| * | MAINT: Get rid of some harmless gcc warnings about macro redefines.Charles Harris2015-01-273-3/+3
| | | | | | | | | | | | | | | | | | | | | The Python.h header likes to be included first, otherwise warnings about redefining "_POSIX_C_SOURCE" and "_XOPEN_SOURCE" are generated. This is really a problem with the Python.h header, but can be worked around by changing the order of inclusion.
| * | TST: Add testcase for the fix to bug #4476.Gerrit Holl2015-01-251-0/+15
| | | | | | | | | | | | | | | | | | Add a testcase `test_fillvalue_datetime_timedelta` to class `TestFillingValues` for the fix to bug #4476. See commit 216fd17 and pull request #5455.
| * | BUG: Fix #4476 by adding datetime64 and timedelta64 typesGerrit Holl2015-01-251-5/+10
| | | | | | | | | | | | | | | | | | | | | This commit fixes bug #4476 by adding the codes for the datetime64 and timedelta64 types to the `default_filler` dictionary in numpy.ma.core, used by `default_fill_value`. Also adapt checking in the `default_fill_value` to include code for timedelta64, not only datetime64.
| * | DOC: fix a few bugs in the random.pareto docstring. Closes gh-4181.Ralf Gommers2015-01-251-15/+15
| | | | | | | | | | | | [ci skip]
| * | TST: Add test for loadtxt with None as string type.Charles Harris2015-01-251-0/+8
| | |
| * | BUG: Fix loadtxt with comments=None and a string None data.Leonardo Donelli2015-01-251-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.
* | | Merge pull request #5478 from charris/fix-1.9-alignmentJulian Taylor2015-01-254-2/+28
|\ \ \ | |/ / |/| | Fix too large alignment of complex types
| * | BUG: reduce maximum alignment to 8 bytes on 32 bitJulian Taylor2015-01-212-1/+7
| | | | | | | | | | | | | | | | | | | | | malloc only provides 8byte alignment and is sufficient to load complex on x86 platforms. This fixes the f2py alignment failures with complex types on win32 or on linux32 with -malign-double
| * | BUG: fix string arrays not being alignedJulian Taylor2015-01-212-1/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | If itemsize is a power of two use that as the required alignment up to the maximum provided by the platform. Power of two sizes may be accessed via larger moves than bytes. Non-power of two sizes are accessed bytewise and can thus always be considered aligned. Closes gh-5293
* | | Merge pull request #5492 from grahamc/gotofail-malloc-ret-null-fftJulian Taylor2015-01-251-1/+4
|\ \ \ | | |/ | |/| | | | PyErr_NoMemory when PyArray_Zeros fails to initialize
| * | BUG: PyErr_NoMemory when PyArray_Zeros fails to initializeGraham Christensen2015-01-251-1/+4
| | |
* | | Merge pull request #5481 from charris/backport-1.9-gh-5480Charles Harris2015-01-223-29/+139
|\ \ \ | | | | | | | | BUG: Fix astype for structured array fields of different byte order.
| * | | BUG: Fix astype for structured array fields of different byte order.Darsh P. Ranjan2015-01-223-29/+139
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The offending commit is c53b0e4, which introduced two regressions: - using astype to cast a structured array to one with a different byte order no longer works; - comparing structured-array dtypes can give incorrect results if the two dtypes have different byte orders. This pull request should fix both. One thing I wasn't sure about is reordering struct fields. In my implementation, the `equiv`, `same_kind`, and `safe` rules are now allowed to reorder fields. If that isn't desired, though, it's a pretty easy change.
* | | Merge pull request #5447 from juliantaylor/ma-median-ndarrayJulian Taylor2015-01-142-2/+6
|\ \ \ | |/ / |/| / | |/ BUG: fix ma.median used on ndarrays
| * BUG: fix ma.median used on ndarraysJulian Taylor2015-01-132-2/+6
| | | | | | | | | | | | ndarrays have a data attribute pointing to the data buffer which leads to the median working on a byte view instead of the actual type. closes gh-5424
* | Merge pull request #5417 from charris/tests-for-PyArray_AsCArrayCharles Harris2015-01-022-1/+96
|\ \ | | | | | | TST: added test for PyArray_AsCArray #5313
| * | TST: added test for PyArray_AsCArray #5313Henning Dickten2015-01-022-1/+96
| | |
* | | BUG: Closes #5313 PyArray_AsCArray caused segfaultHenning Dickten2015-01-021-1/+1
| | |
* | | Merge pull request #5392 from charris/xerbla-1.9Charles Harris2015-01-023-4/+59
|\ \ \ | | | | | | | | BUG: Xerbla doesn't get linked in 1.9 on Fedora 21.
| * | | BUG: Xerbla doesn't get linked in 1.9 on Fedora 21.Charles Harris2014-12-243-4/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add our python_xerbla to the blasdot sources. That function is needed for all modules that link to the ATLAS 3.10 libraries, which in Fedora 21 are located in just two files: libsatlas and libtatlas. Also make the test for xerbla linkage work better. If xerbla is not linked the test will be skipped with a message.
* | | | Merge pull request #5393 from charris/detect_atlas_3_10Ralf Gommers2014-12-291-3/+80
|\ \ \ \ | |/ / / |/| | | ENH: Add support for ATLAS > 3.9.33.
| * | | ENH: Add support for ATLAS > 3.9.33.Charles Harris2014-12-241-3/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Recent ATLAS combines the previous libraries into two * libsatlas -- single threaded. * libtatlas -- threaded. This fix is a bit of hack in that ATLAS > 3.9.33 is treated as a new, separate library covered by atlas_3_10_info, but the latter derived from atlas_info, which treats the cblas, atlas, and atlas_lapack libraries separately, so the new info has a bit of repetition. The alternative would be to rewrite atlas_info, but that can wait on a larger cleanup of the build system. Closes #3774.
* | | | Merge pull request #5374 from lebigot/patch-1Julian Taylor2014-12-241-1/+1
|\ \ \ \ | | |/ / | |/| | | | | | DOC: Fixed incorrect assert_array_almost_equal_nulp documentation
| * | | DOC: Fixed incorrect assert_array_almost_equal_nulp documentationEric O. LEBIGOT (EOL)2014-12-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The `max()` function previously used does not work with two array-like. `maximum()` does, and is what is essentially used in the code (`ref = nulp * np.spacing(np.where(ax > ay, ax, ay))`).
* | | | Merge pull request #5390 from sturlamolden/mtrand-bugfix-threadsafeJulian Taylor2014-12-231-16/+22
|\ \ \ \ | |/ / / | | | | | | | | BUG: Make RandomState.seed, RandomState.randint and RandomState.shuffle threadsafe
| * | | BUG: make seed, randint and shuffle threadsafeSturla Molden2014-12-231-16/+22
| | | |
* | | | Merge pull request #5388 from sturlamolden/mtrand-bugfix-threadsafeJulian Taylor2014-12-231-7/+11
|\ \ \ \ | |/ / / | | | | | | | | BUG: Make RandomState.set_state and RandomState.get_state threadsafe
| * | | BUG: make set_state and get_state threadsafeSturla Molden2014-12-231-7/+11
| |/ /
* | | Merge pull request #5359 from tacaswell/linspace_docJulian Taylor2014-12-101-2/+4
|\ \ \ | |/ / | | | | | | DOC : minor changes to linspace docstring
| * | DOC : minor changes to linspace docstringThomas A Caswell2014-12-101-2/+4
| | | | | | | | | | | | | | | - added optional flag to dtype - moved conditional on step to the description from the type
* | | Fix issue with fromarrays not correctly determining a format string for ↵Erik M. Bray2014-11-022-7/+12
| | | | | | | | | | | | unicode data (in the process eliminate some unnecessary cruft)
* | | Merge pull request #5242 from juliantaylor/fix-ufunc-subok-outJulian Taylor2014-10-294-6/+55
|\ \ \ | |/ / | | | | | | BUG: fix not returning out array from ufuncs with subok=False set
| * | BUG: fix not returning out array from ufuncs with subok=False setJulian Taylor2014-10-284-6/+55
| | | | | | | | | | | | closes gh-5240
* | | Merge pull request #5223 from sturlamolden/accelerate-sgemv-fixJulian Taylor2014-10-264-5/+299
|\ \ \ | | | | | | | | BUG: Ugly fix for Apple's cblas_sgemv segfault
| * | | BUG: Ugly fix for Apple's cblas_sgemv segfaultSturla Molden2014-10-234-5/+299
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SGEMV in Accelerate framework will segfault on MacOS X version 10.9 (aka Mavericks) if arrays are not aligned to 32 byte boundaries and the CPU supports AVX instructions. This can produce segfaults in numpy.dot if we use numpy.float32 as dtype. This patch overshadows the symbols cblas_sgemv, sgemv_ and sgemv exported by Accelerate to produce the correct behavior. The MacOS X version and CPU specs are checked on module import. If Mavericks and AVX are detected the call to SGEMV is emulated with a call to SGEMM if the arrays are not 32 byte aligned. If the exported symbols cannot be overshadowed on module import, a fatal error is produced and the process aborts. All the fixes are in a self-contained C file and do not alter the _dotblas C code. The patch is not applied unless NumPy is configured to link with Apple's Accelerate framework.
* | | | Merge pull request #5203 from njsmith/masterJulian Taylor2014-10-264-6/+62
|\ \ \ \ | | | | | | | | | | | | | | | BUG: copy inherited masks in MaskedArray.__array_finalize__
| * | | | BUG: copy inherited masks in MaskedArray.__array_finalize__Nathaniel J. Smith2014-10-214-6/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, operations which created a new masked array from an old masked array -- e.g., np.empty_like -- would tend to result in the new and old arrays sharing the same .mask attribute. This leads to horrible brokenness in which writes to one array affect the other. In particular this was responsible for part of the brokenness that @jenshnielsen reported in gh-5184 in which np.gradient on masked arrays would modify the original array's mask. This fixes the worst part of the issues addressed in gh-3404, though there's still an argument that we ought to deprecate the mask-copying behaviour entirely so that empty_like returns an array with an empty mask. That can wait until we find someone who cares though. I also applied a small speedup to np.gradient (avoiding one copy); previously this inefficiency was masking (heh) some of the problems with masked arrays, so removing it is both an optimization and makes it easier to test that things are working now.
* | | | | Merge pull request #5234 from juliantaylor/backports-1.9.1Julian Taylor2014-10-264-23/+46
|\ \ \ \ \ | | | | | | | | | | | | Backports for 1.9.1
| * | | | | BUG: Fixes #5184 gradient calculation behavior at boundariesDavid M Fobes2014-10-262-22/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Previous expected behavior was that the gradient is computed using central differences in the interior and first differences at the boundaries. * gradient was updated in v1.9.0 so that second-order accurate calculations are done at the boundaries, but this breaks expected behavior with old code, so `edge_order` keyword (Default: 1) is added to specify whether first or second order calculations at the boundaries should be used. * Since the second argument is *varargs, in order to maintain compatibility with old code and compatibility with python 2.6 & 2.7, **kwargs is used, and all kwargs that are not `edge_order` raise an error, listing the offending kwargs. * Tests and documentation updated to reflect this change. * Added `.. versionadded:: 1.9.1` to the new optional kwarg `edge_order` documentation, and specified supported `edge_order` kwarg values. * Clarified documentation for `varargs`. * Made indentation in docstring consistent with other docstring styles. * Examples corrected
| * | | | | BUG: io: genfromtxt did not handle filling_values=0 correctly. Closes gh-2317.Warren Weckesser2014-10-262-1/+13
| | | | | |