diff options
-rw-r--r-- | INSTALL.txt | 14 | ||||
-rw-r--r-- | numpy/core/src/multiarray/getset.c | 3 | ||||
-rw-r--r-- | numpy/core/src/umath/reduction.c | 2 | ||||
-rw-r--r-- | numpy/core/tests/test_regression.py | 7 | ||||
-rw-r--r-- | numpy/linalg/linalg.py | 2 |
5 files changed, 18 insertions, 10 deletions
diff --git a/INSTALL.txt b/INSTALL.txt index d75d4d9d0..d593dc8ee 100644 --- a/INSTALL.txt +++ b/INSTALL.txt @@ -60,7 +60,7 @@ How to check the ABI of blas/lapack/atlas One relatively simple and reliable way to check for the compiler used to build a library is to use ldd on the library. If libg2c.so is a dependency, this -means that g77 has been used. If libgfortran.so is a a dependency, gfortran has +means that g77 has been used. If libgfortran.so is a dependency, gfortran has been used. If both are dependencies, this means both have been used, which is almost always a very bad idea. @@ -74,8 +74,8 @@ You can install the necessary packages for optimized ATLAS with this command: sudo apt-get install libatlas-base-dev -If you have a recent CPU with SIMD suppport (SSE, SSE2, etc...), you should -also install the corresponding package for optimal performances. For example, +If you have a recent CPU with SIMD support (SSE, SSE2, etc...), you should +also install the corresponding package for optimal performance. For example, for SSE2: sudo apt-get install libatlas3gf-sse2 @@ -91,8 +91,8 @@ You can install the necessary packages for optimized ATLAS with this command: sudo apt-get install atlas3-base-dev -If you have a recent CPU with SIMD suppport (SSE, SSE2, etc...), you should -also install the corresponding package for optimal performances. For example, +If you have a recent CPU with SIMD support (SSE, SSE2, etc...), you should +also install the corresponding package for optimal performance. For example, for SSE2: sudo apt-get install atlas3-sse2 @@ -111,7 +111,7 @@ http://mingw-w64.sourceforge.net/ To use the free compilers (mingw-w64), you need to build your own toolchain, as the mingw project only distribute cross-compilers (cross-compilation is not supported by numpy). Since this toolchain is still being worked on, serious -compilers bugs can be expected. binutil 2.19 + gcc 4.3.3 + mingw-w64 runtime +compiler bugs can be expected. binutil 2.19 + gcc 4.3.3 + mingw-w64 runtime gives you a working C compiler (but the C++ is broken). gcc 4.4 will hopefully be able to run natively. @@ -127,7 +127,7 @@ fragile, and often segfault on invalid C code). The main drawback is that no fortran compiler + MS compiler combination has been tested - mingw-w64 gfortran + MS compiler does not work at all (it is unclear whether it ever will). -For python 2.5, you need VS 2005 (MS compiler version 14) targetting +For python 2.5, you need VS 2005 (MS compiler version 14) targeting AMD64 bits, or the Platform SDK v6.0 or below (which gives command line versions of 64 bits target compilers). The PSDK is free. diff --git a/numpy/core/src/multiarray/getset.c b/numpy/core/src/multiarray/getset.c index 32212ebc4..acefa888d 100644 --- a/numpy/core/src/multiarray/getset.c +++ b/numpy/core/src/multiarray/getset.c @@ -149,7 +149,8 @@ array_strides_set(PyArrayObject *self, PyObject *obj) goto fail; } memcpy(PyArray_STRIDES(self), newstrides.ptr, sizeof(npy_intp)*newstrides.len); - PyArray_UpdateFlags(self, NPY_ARRAY_C_CONTIGUOUS | NPY_ARRAY_F_CONTIGUOUS); + PyArray_UpdateFlags(self, NPY_ARRAY_C_CONTIGUOUS | NPY_ARRAY_F_CONTIGUOUS | + NPY_ARRAY_ALIGNED); PyDimMem_FREE(newstrides.ptr); return 0; diff --git a/numpy/core/src/umath/reduction.c b/numpy/core/src/umath/reduction.c index 444682d57..e6ed04e99 100644 --- a/numpy/core/src/umath/reduction.c +++ b/numpy/core/src/umath/reduction.c @@ -21,7 +21,7 @@ #include <numpy/arrayobject.h> #include "npy_config.h" -#include "numpy/npy_3kcompat.h" +#include "npy_pycompat.h" #include "lowlevel_strided_loops.h" #include "reduction.h" diff --git a/numpy/core/tests/test_regression.py b/numpy/core/tests/test_regression.py index 0f268fce8..38ab56eb6 100644 --- a/numpy/core/tests/test_regression.py +++ b/numpy/core/tests/test_regression.py @@ -1649,6 +1649,13 @@ class TestRegression(TestCase): assert_equal(r[0:3:2]['f1'][0][()], r[0:3:2][0]['f1'][()]) assert_equal(r[0:3:2]['f1'][0].strides, r[0:3:2][0]['f1'].strides) + def test_alignment_update(self): + """Check that alignment flag is updated on stride setting""" + a = np.arange(10) + assert_(a.flags.aligned) + a.strides = 3 + assert_(not a.flags.aligned) + def test_ticket_1770(self): "Should not segfault on python 3k" import numpy as np diff --git a/numpy/linalg/linalg.py b/numpy/linalg/linalg.py index a7f1c074d..398733a86 100644 --- a/numpy/linalg/linalg.py +++ b/numpy/linalg/linalg.py @@ -299,7 +299,7 @@ def solve(a, b): Check that the solution is correct: - >>> (np.dot(a, x) == b).all() + >>> np.allclose(np.dot(a, x), b) True """ |