Skip to content
This repository
Browse code

Merge pull request #2879 from rgommers/issue-413-arm-failures

Fix ARM failures (gh-413)
  • Loading branch information...
commit cce1c45afa3d821c5ca313f06b2481e55c98a238 2 parents c745862 + 8c05bdb
njsmith authored
25  .travis-make-py24-virtualenv.sh
... ...
@@ -1,25 +0,0 @@
1  
-#!/bin/sh
2  
-
3  
-VIRTENV=$1
4  
-
5  
-set -x
6  
-set -e
7  
-
8  
-curl -O http://www.python.org/ftp/python/2.4.6/Python-2.4.6.tar.bz2
9  
-tar xjf Python-2.4.6.tar.bz2
10  
-cd Python-2.4.6
11  
-cat >setup.cfg <<EOF
12  
-[build_ext]
13  
-library_dirs=/usr/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH)/
14  
-EOF
15  
-./configure --prefix=$PWD/install
16  
-make
17  
-make install
18  
-# This is the last version of virtualenv to support python 2.4:
19  
-curl -O https://raw.github.com/pypa/virtualenv/1.7.2/virtualenv.py
20  
-# And this is the last version of pip to support python 2.4. If
21  
-# there's a file matching "^pip-.*(zip|tar.gz|tar.bz2|tgz|tbz)$" in
22  
-# the current directory then virtualenv will take that as the pip
23  
-# source distribution to install
24  
-curl -O http://pypi.python.org/packages/source/p/pip/pip-1.1.tar.gz
25  
-install/bin/python2.4 ./virtualenv.py --distribute $VIRTENV
25  .travis.yml
@@ -2,27 +2,12 @@
2 2
 #   http://lint.travis-ci.org/
3 3
 language: python
4 4
 python:
5  
-  - 2.5
6 5
   - 2.6
7 6
   - 2.7
8 7
   - 3.2
9 8
   - 3.3
10  
-env:
11  
-  # Hack: 
12  
-  #
13  
-  # We want to test from Python 2.4 to Python 3.2
14  
-  # but Travis doesn't support python 2.4, and never will:
15  
-  #   https://github.com/travis-ci/travis-ci/issues/485
16  
-  #
17  
-  # So what we do is add TEST_PY24=true to the build matrix, and then for that one
18  
-  # version we don't actually use the system python, but instead build 2.4 and
19  
-  # use it.
20  
-  #
21  
-  - TEST_PY24=""
22 9
 matrix:
23 10
   include:
24  
-    - python: 2.5
25  
-      env: TEST_PY24="true"
26 11
     - python: 2.7
27 12
       env: NPY_SEPARATE_COMPILATION=1
28 13
     - python: 3.2
@@ -30,16 +15,6 @@ matrix:
30 15
 before_install:
31 16
   - mkdir builds
32 17
   - pushd builds
33  
-  # This has to be on a single "virtual line" because of how Travis
34  
-  # munges each line before executing it to print out the exit status.
35  
-  # It's okay for it to be on multiple physical lines, so long as you remember:
36  
-  # - There can't be any leading "-"s
37  
-  # - All newlines will be removed, so use ";"s
38  
-  - if [ "${TEST_PY24}" == "true" ]; then
39  
-      deactivate; 
40  
-      ../.travis-make-py24-virtualenv.sh $PWD/py24-ve;
41  
-      source $PWD/py24-ve/bin/activate;
42  
-      fi
43 18
   - pip install nose
44 19
   # pip install coverage
45 20
   - python -V
46  numpy/core/tests/test_errstate.py
... ...
@@ -1,37 +1,30 @@
1  
-# The following exec statement (or something like it) is needed to
2  
-# prevent SyntaxError on Python < 2.5. Even though this is a test,
3  
-# SyntaxErrors are not acceptable; on Debian systems, they block
4  
-# byte-compilation during install and thus cause the package to fail
5  
-# to install.
  1
+import platform
  2
+
  3
+import numpy as np
  4
+from numpy.testing import TestCase, assert_, run_module_suite, dec
6 5
 
7  
-import sys
8  
-if sys.version_info[:2] >= (2, 5):
9  
-    exec """
10  
-from __future__ import with_statement
11  
-from numpy.core import *
12  
-from numpy.random import rand, randint
13  
-from numpy.testing import *
14 6
 
15 7
 class TestErrstate(TestCase):
  8
+    @dec.skipif(platform.machine() == "armv5tel", "See gh-413.")
16 9
     def test_invalid(self):
17  
-        with errstate(all='raise', under='ignore'):
18  
-            a = -arange(3)
  10
+        with np.errstate(all='raise', under='ignore'):
  11
+            a = -np.arange(3)
19 12
             # This should work
20  
-            with errstate(invalid='ignore'):
21  
-                sqrt(a)
  13
+            with np.errstate(invalid='ignore'):
  14
+                np.sqrt(a)
22 15
             # While this should fail!
23 16
             try:
24  
-                sqrt(a)
  17
+                np.sqrt(a)
25 18
             except FloatingPointError:
26 19
                 pass
27 20
             else:
28 21
                 self.fail("Did not raise an invalid error")
29 22
 
30 23
     def test_divide(self):
31  
-        with errstate(all='raise', under='ignore'):
32  
-            a = -arange(3)
  24
+        with np.errstate(all='raise', under='ignore'):
  25
+            a = -np.arange(3)
33 26
             # This should work
34  
-            with errstate(divide='ignore'):
  27
+            with np.errstate(divide='ignore'):
35 28
                 a // 0
36 29
             # While this should fail!
37 30
             try:
@@ -44,14 +37,13 @@ def test_divide(self):
44 37
     def test_errcall(self):
45 38
         def foo(*args):
46 39
             print(args)
47  
-        olderrcall = geterrcall()
48  
-        with errstate(call=foo):
49  
-            assert_(geterrcall() is foo, 'call is not foo')
50  
-            with errstate(call=None):
51  
-                assert_(geterrcall() is None, 'call is not None')
52  
-        assert_(geterrcall() is olderrcall, 'call is not olderrcall')
  40
+        olderrcall = np.geterrcall()
  41
+        with np.errstate(call=foo):
  42
+            assert_(np.geterrcall() is foo, 'call is not foo')
  43
+            with np.errstate(call=None):
  44
+                assert_(np.geterrcall() is None, 'call is not None')
  45
+        assert_(np.geterrcall() is olderrcall, 'call is not olderrcall')
53 46
 
54  
-"""
55 47
 
56 48
 if __name__ == "__main__":
57 49
     run_module_suite()
8  numpy/core/tests/test_half.py
... ...
@@ -1,7 +1,9 @@
1  
-import warnings
  1
+import platform
  2
+
2 3
 import numpy as np
3 4
 from numpy import uint16, float16, float32, float64
4  
-from numpy.testing import TestCase, run_module_suite, assert_, assert_equal 
  5
+from numpy.testing import TestCase, run_module_suite, assert_, assert_equal, \
  6
+    dec
5 7
 
6 8
 
7 9
 def assert_raises_fpe(strmatch, callable, *args, **kwargs):
@@ -357,8 +359,8 @@ def test_half_coercion(self):
357 359
         assert_equal(np.power(b32,a16).dtype, float16)
358 360
         assert_equal(np.power(b32,b16).dtype, float32)
359 361
 
  362
+    @dec.skipif(platform.machine() == "armv5tel", "See gh-413.")
360 363
     def test_half_fpe(self):
361  
-        """Test that half raises the correct underflows and overflows"""
362 364
         oldsettings = np.seterr(all='raise')
363 365
         try:
364 366
             sx16 = np.array((1e-4,),dtype=float16)
89  numpy/core/tests/test_numeric.py
... ...
@@ -1,13 +1,13 @@
1 1
 import sys
  2
+import platform
2 3
 from decimal import Decimal
3 4
 
4 5
 import numpy as np
5 6
 from numpy.core import *
6 7
 from numpy.random import rand, randint, randn
7 8
 from numpy.testing import *
8  
-from numpy.testing.utils import WarningManager
9 9
 from numpy.core.multiarray import dot as dot_
10  
-import warnings
  10
+
11 11
 
12 12
 class Vec(object):
13 13
     def __init__(self,sequence=None):
@@ -246,6 +246,7 @@ def test_set(self):
246 246
         finally:
247 247
             seterr(**err)
248 248
 
  249
+    @dec.skipif(platform.machine() == "armv5tel", "See gh-413.")
249 250
     def test_divide_err(self):
250 251
         err = seterr(divide='raise')
251 252
         try:
@@ -345,7 +346,7 @@ def test_floating_exceptions(self):
345 346
 
346 347
 class TestTypes(TestCase):
347 348
     def check_promotion_cases(self, promote_func):
348  
-        """Tests that the scalars get coerced correctly."""
  349
+        #Tests that the scalars get coerced correctly.
349 350
         b = np.bool_(0)
350 351
         i8, i16, i32, i64 = int8(0), int16(0), int32(0), int64(0)
351 352
         u8, u16, u32, u64 = uint8(0), uint16(0), uint32(0), uint64(0)
@@ -740,7 +741,7 @@ def _generate_int32_data(self, n, m):
740 741
 
741 742
     # Now the real test cases
742 743
     def test_simple_double(self):
743  
-        """Test native double input with scalar min/max."""
  744
+        #Test native double input with scalar min/max.
744 745
         a   = self._generate_data(self.nr, self.nc)
745 746
         m   = 0.1
746 747
         M   = 0.6
@@ -749,7 +750,7 @@ def test_simple_double(self):
749 750
         assert_array_strict_equal(ac, act)
750 751
 
751 752
     def test_simple_int(self):
752  
-        """Test native int input with scalar min/max."""
  753
+        #Test native int input with scalar min/max.
753 754
         a   = self._generate_int_data(self.nr, self.nc)
754 755
         a   = a.astype(int)
755 756
         m   = -2
@@ -759,7 +760,7 @@ def test_simple_int(self):
759 760
         assert_array_strict_equal(ac, act)
760 761
 
761 762
     def test_array_double(self):
762  
-        """Test native double input with array min/max."""
  763
+        #Test native double input with array min/max.
763 764
         a   = self._generate_data(self.nr, self.nc)
764 765
         m   = zeros(a.shape)
765 766
         M   = m + 0.5
@@ -768,8 +769,8 @@ def test_array_double(self):
768 769
         assert_array_strict_equal(ac, act)
769 770
 
770 771
     def test_simple_nonnative(self):
771  
-        """Test non native double input with scalar min/max.
772  
-        Test native double input with non native double scalar min/max."""
  772
+        #Test non native double input with scalar min/max.
  773
+        #Test native double input with non native double scalar min/max.
773 774
         a   = self._generate_non_native_data(self.nr, self.nc)
774 775
         m   = -0.5
775 776
         M   = 0.6
@@ -777,7 +778,7 @@ def test_simple_nonnative(self):
777 778
         act = self.clip(a, m, M)
778 779
         assert_array_equal(ac, act)
779 780
 
780  
-        "Test native double input with non native double scalar min/max."
  781
+        #Test native double input with non native double scalar min/max.
781 782
         a   = self._generate_data(self.nr, self.nc)
782 783
         m   = -0.5
783 784
         M   = self._neg_byteorder(0.6)
@@ -787,9 +788,8 @@ def test_simple_nonnative(self):
787 788
         assert_array_equal(ac, act)
788 789
 
789 790
     def test_simple_complex(self):
790  
-        """Test native complex input with native double scalar min/max.
791  
-        Test native input with complex double scalar min/max.
792  
-        """
  791
+        #Test native complex input with native double scalar min/max.
  792
+        #Test native input with complex double scalar min/max.
793 793
         a   = 3 * self._generate_data_complex(self.nr, self.nc)
794 794
         m   = -0.5
795 795
         M   = 1.
@@ -797,7 +797,7 @@ def test_simple_complex(self):
797 797
         act = self.clip(a, m, M)
798 798
         assert_array_strict_equal(ac, act)
799 799
 
800  
-        "Test native input with complex double scalar min/max."
  800
+        #Test native input with complex double scalar min/max.
801 801
         a   = 3 * self._generate_data(self.nr, self.nc)
802 802
         m   = -0.5 + 1.j
803 803
         M   = 1. + 2.j
@@ -806,7 +806,7 @@ def test_simple_complex(self):
806 806
         assert_array_strict_equal(ac, act)
807 807
 
808 808
     def test_clip_non_contig(self):
809  
-        """Test clip for non contiguous native input and native scalar min/max."""
  809
+        #Test clip for non contiguous native input and native scalar min/max.
810 810
         a   = self._generate_data(self.nr * 2, self.nc * 3)
811 811
         a   = a[::2, ::3]
812 812
         assert_(not a.flags['F_CONTIGUOUS'])
@@ -816,7 +816,7 @@ def test_clip_non_contig(self):
816 816
         assert_array_strict_equal(ac, act)
817 817
 
818 818
     def test_simple_out(self):
819  
-        """Test native double input with scalar min/max."""
  819
+        #Test native double input with scalar min/max.
820 820
         a   = self._generate_data(self.nr, self.nc)
821 821
         m   = -0.5
822 822
         M   = 0.6
@@ -827,7 +827,7 @@ def test_simple_out(self):
827 827
         assert_array_strict_equal(ac, act)
828 828
 
829 829
     def test_simple_int32_inout(self):
830  
-        """Test native int32 input with double min/max and int32 out."""
  830
+        #Test native int32 input with double min/max and int32 out.
831 831
         a   = self._generate_int32_data(self.nr, self.nc)
832 832
         m   = float64(0)
833 833
         M   = float64(2)
@@ -838,7 +838,7 @@ def test_simple_int32_inout(self):
838 838
         assert_array_strict_equal(ac, act)
839 839
 
840 840
     def test_simple_int64_out(self):
841  
-        """Test native int32 input with int32 scalar min/max and int64 out."""
  841
+        #Test native int32 input with int32 scalar min/max and int64 out.
842 842
         a   = self._generate_int32_data(self.nr, self.nc)
843 843
         m   = int32(-1)
844 844
         M   = int32(1)
@@ -849,7 +849,7 @@ def test_simple_int64_out(self):
849 849
         assert_array_strict_equal(ac, act)
850 850
 
851 851
     def test_simple_int64_inout(self):
852  
-        """Test native int32 input with double array min/max and int32 out."""
  852
+        #Test native int32 input with double array min/max and int32 out.
853 853
         a   = self._generate_int32_data(self.nr, self.nc)
854 854
         m   = zeros(a.shape, float64)
855 855
         M   = float64(1)
@@ -860,7 +860,7 @@ def test_simple_int64_inout(self):
860 860
         assert_array_strict_equal(ac, act)
861 861
 
862 862
     def test_simple_int32_out(self):
863  
-        """Test native double input with scalar min/max and int out."""
  863
+        #Test native double input with scalar min/max and int out.
864 864
         a   = self._generate_data(self.nr, self.nc)
865 865
         m   = -1.0
866 866
         M   = 2.0
@@ -871,7 +871,7 @@ def test_simple_int32_out(self):
871 871
         assert_array_strict_equal(ac, act)
872 872
 
873 873
     def test_simple_inplace_01(self):
874  
-        """Test native double input with array min/max in-place."""
  874
+        #Test native double input with array min/max in-place.
875 875
         a   = self._generate_data(self.nr, self.nc)
876 876
         ac  = a.copy()
877 877
         m   = zeros(a.shape)
@@ -881,7 +881,7 @@ def test_simple_inplace_01(self):
881 881
         assert_array_strict_equal(a, ac)
882 882
 
883 883
     def test_simple_inplace_02(self):
884  
-        """Test native double input with scalar min/max in-place."""
  884
+        #Test native double input with scalar min/max in-place.
885 885
         a   = self._generate_data(self.nr, self.nc)
886 886
         ac  = a.copy()
887 887
         m   = -0.5
@@ -891,7 +891,7 @@ def test_simple_inplace_02(self):
891 891
         assert_array_strict_equal(a, ac)
892 892
 
893 893
     def test_noncontig_inplace(self):
894  
-        """Test non contiguous double input with double scalar min/max in-place."""
  894
+        #Test non contiguous double input with double scalar min/max in-place.
895 895
         a   = self._generate_data(self.nr * 2, self.nc * 3)
896 896
         a   = a[::2, ::3]
897 897
         assert_(not a.flags['F_CONTIGUOUS'])
@@ -904,7 +904,7 @@ def test_noncontig_inplace(self):
904 904
         assert_array_equal(a, ac)
905 905
 
906 906
     def test_type_cast_01(self):
907  
-        "Test native double input with scalar min/max."
  907
+        #Test native double input with scalar min/max.
908 908
         a   = self._generate_data(self.nr, self.nc)
909 909
         m   = -0.5
910 910
         M   = 0.6
@@ -913,7 +913,7 @@ def test_type_cast_01(self):
913 913
         assert_array_strict_equal(ac, act)
914 914
 
915 915
     def test_type_cast_02(self):
916  
-        "Test native int32 input with int32 scalar min/max."
  916
+        #Test native int32 input with int32 scalar min/max.
917 917
         a   = self._generate_int_data(self.nr, self.nc)
918 918
         a   = a.astype(int32)
919 919
         m   = -2
@@ -923,7 +923,7 @@ def test_type_cast_02(self):
923 923
         assert_array_strict_equal(ac, act)
924 924
 
925 925
     def test_type_cast_03(self):
926  
-        "Test native int32 input with float64 scalar min/max."
  926
+        #Test native int32 input with float64 scalar min/max.
927 927
         a   = self._generate_int32_data(self.nr, self.nc)
928 928
         m   = -2
929 929
         M   = 4
@@ -932,7 +932,7 @@ def test_type_cast_03(self):
932 932
         assert_array_strict_equal(ac, act)
933 933
 
934 934
     def test_type_cast_04(self):
935  
-        "Test native int32 input with float32 scalar min/max."
  935
+        #Test native int32 input with float32 scalar min/max.
936 936
         a   = self._generate_int32_data(self.nr, self.nc)
937 937
         m   = float32(-2)
938 938
         M   = float32(4)
@@ -941,7 +941,7 @@ def test_type_cast_04(self):
941 941
         assert_array_strict_equal(ac, act)
942 942
 
943 943
     def test_type_cast_05(self):
944  
-        "Test native int32 with double arrays min/max."
  944
+        #Test native int32 with double arrays min/max.
945 945
         a   = self._generate_int_data(self.nr, self.nc)
946 946
         m   = -0.5
947 947
         M   = 1.
@@ -950,7 +950,7 @@ def test_type_cast_05(self):
950 950
         assert_array_strict_equal(ac, act)
951 951
 
952 952
     def test_type_cast_06(self):
953  
-        "Test native with NON native scalar min/max."
  953
+        #Test native with NON native scalar min/max.
954 954
         a   = self._generate_data(self.nr, self.nc)
955 955
         m   = 0.5
956 956
         m_s = self._neg_byteorder(m)
@@ -960,7 +960,7 @@ def test_type_cast_06(self):
960 960
         assert_array_strict_equal(ac, act)
961 961
 
962 962
     def test_type_cast_07(self):
963  
-        "Test NON native with native array min/max."
  963
+        #Test NON native with native array min/max.
964 964
         a   = self._generate_data(self.nr, self.nc)
965 965
         m   = -0.5 * ones(a.shape)
966 966
         M   = 1.
@@ -971,7 +971,7 @@ def test_type_cast_07(self):
971 971
         assert_array_strict_equal(ac, act)
972 972
 
973 973
     def test_type_cast_08(self):
974  
-        "Test NON native with native scalar min/max."
  974
+        #Test NON native with native scalar min/max.
975 975
         a   = self._generate_data(self.nr, self.nc)
976 976
         m   = -0.5
977 977
         M   = 1.
@@ -982,7 +982,7 @@ def test_type_cast_08(self):
982 982
         assert_array_strict_equal(ac, act)
983 983
 
984 984
     def test_type_cast_09(self):
985  
-        "Test native with NON native array min/max."
  985
+        #Test native with NON native array min/max.
986 986
         a   = self._generate_data(self.nr, self.nc)
987 987
         m   = -0.5 * ones(a.shape)
988 988
         M   = 1.
@@ -993,7 +993,7 @@ def test_type_cast_09(self):
993 993
         assert_array_strict_equal(ac, act)
994 994
 
995 995
     def test_type_cast_10(self):
996  
-        """Test native int32 with float min/max and float out for output argument."""
  996
+        #Test native int32 with float min/max and float out for output argument.
997 997
         a   = self._generate_int_data(self.nr, self.nc)
998 998
         b   = zeros(a.shape, dtype = float32)
999 999
         m   = float32(-0.5)
@@ -1003,7 +1003,7 @@ def test_type_cast_10(self):
1003 1003
         assert_array_strict_equal(ac, act)
1004 1004
 
1005 1005
     def test_type_cast_11(self):
1006  
-        "Test non native with native scalar, min/max, out non native"
  1006
+        #Test non native with native scalar, min/max, out non native
1007 1007
         a   = self._generate_non_native_data(self.nr, self.nc)
1008 1008
         b   = a.copy()
1009 1009
         b   = b.astype(b.dtype.newbyteorder('>'))
@@ -1015,7 +1015,7 @@ def test_type_cast_11(self):
1015 1015
         assert_array_strict_equal(b, bt)
1016 1016
 
1017 1017
     def test_type_cast_12(self):
1018  
-        "Test native int32 input and min/max and float out"
  1018
+        #Test native int32 input and min/max and float out
1019 1019
         a   = self._generate_int_data(self.nr, self.nc)
1020 1020
         b   = zeros(a.shape, dtype = float32)
1021 1021
         m   = int32(0)
@@ -1025,7 +1025,7 @@ def test_type_cast_12(self):
1025 1025
         assert_array_strict_equal(ac, act)
1026 1026
 
1027 1027
     def test_clip_with_out_simple(self):
1028  
-        "Test native double input with scalar min/max"
  1028
+        #Test native double input with scalar min/max
1029 1029
         a   = self._generate_data(self.nr, self.nc)
1030 1030
         m   = -0.5
1031 1031
         M   = 0.6
@@ -1036,7 +1036,7 @@ def test_clip_with_out_simple(self):
1036 1036
         assert_array_strict_equal(ac, act)
1037 1037
 
1038 1038
     def test_clip_with_out_simple2(self):
1039  
-        "Test native int32 input with double min/max and int32 out"
  1039
+        #Test native int32 input with double min/max and int32 out
1040 1040
         a   = self._generate_int32_data(self.nr, self.nc)
1041 1041
         m   = float64(0)
1042 1042
         M   = float64(2)
@@ -1047,7 +1047,7 @@ def test_clip_with_out_simple2(self):
1047 1047
         assert_array_strict_equal(ac, act)
1048 1048
 
1049 1049
     def test_clip_with_out_simple_int32(self):
1050  
-        "Test native int32 input with int32 scalar min/max and int64 out"
  1050
+        #Test native int32 input with int32 scalar min/max and int64 out
1051 1051
         a   = self._generate_int32_data(self.nr, self.nc)
1052 1052
         m   = int32(-1)
1053 1053
         M   = int32(1)
@@ -1058,7 +1058,7 @@ def test_clip_with_out_simple_int32(self):
1058 1058
         assert_array_strict_equal(ac, act)
1059 1059
 
1060 1060
     def test_clip_with_out_array_int32(self):
1061  
-        "Test native int32 input with double array min/max and int32 out"
  1061
+        #Test native int32 input with double array min/max and int32 out
1062 1062
         a   = self._generate_int32_data(self.nr, self.nc)
1063 1063
         m   = zeros(a.shape, float64)
1064 1064
         M   = float64(1)
@@ -1069,7 +1069,7 @@ def test_clip_with_out_array_int32(self):
1069 1069
         assert_array_strict_equal(ac, act)
1070 1070
 
1071 1071
     def test_clip_with_out_array_outint32(self):
1072  
-        "Test native double input with scalar min/max and int out"
  1072
+        #Test native double input with scalar min/max and int out
1073 1073
         a   = self._generate_data(self.nr, self.nc)
1074 1074
         m   = -1.0
1075 1075
         M   = 2.0
@@ -1080,7 +1080,7 @@ def test_clip_with_out_array_outint32(self):
1080 1080
         assert_array_strict_equal(ac, act)
1081 1081
 
1082 1082
     def test_clip_inplace_array(self):
1083  
-        "Test native double input with array min/max"
  1083
+        #Test native double input with array min/max
1084 1084
         a   = self._generate_data(self.nr, self.nc)
1085 1085
         ac  = a.copy()
1086 1086
         m   = zeros(a.shape)
@@ -1090,7 +1090,7 @@ def test_clip_inplace_array(self):
1090 1090
         assert_array_strict_equal(a, ac)
1091 1091
 
1092 1092
     def test_clip_inplace_simple(self):
1093  
-        "Test native double input with scalar min/max"
  1093
+        #Test native double input with scalar min/max
1094 1094
         a   = self._generate_data(self.nr, self.nc)
1095 1095
         ac  = a.copy()
1096 1096
         m   = -0.5
@@ -1100,8 +1100,7 @@ def test_clip_inplace_simple(self):
1100 1100
         assert_array_strict_equal(a, ac)
1101 1101
 
1102 1102
     def test_clip_func_takes_out(self):
1103  
-        """ Ensure that the clip() function takes an out= argument.
1104  
-        """
  1103
+        # Ensure that the clip() function takes an out= argument.
1105 1104
         a = self._generate_data(self.nr, self.nc)
1106 1105
         ac = a.copy()
1107 1106
         m = -0.5
@@ -1129,7 +1128,7 @@ def tst_not_allclose(self,x,y):
1129 1128
         assert_(not allclose(x,y), "%s and %s shouldn't be close" % (x,y))
1130 1129
 
1131 1130
     def test_ip_allclose(self):
1132  
-        """Parametric test factory."""
  1131
+        #Parametric test factory.
1133 1132
         arr = array([100,1000])
1134 1133
         aran = arange(125).reshape((5,5,5))
1135 1134
 
@@ -1149,7 +1148,7 @@ def test_ip_allclose(self):
1149 1148
             yield (self.tst_allclose,x,y)
1150 1149
 
1151 1150
     def test_ip_not_allclose(self):
1152  
-        """Parametric test factory."""
  1151
+        #Parametric test factory.
1153 1152
         aran = arange(125).reshape((5,5,5))
1154 1153
 
1155 1154
         atol = self.atol
2  numpy/core/tests/test_umath_complex.py
@@ -151,6 +151,7 @@ def test_simple(self):
151 151
             assert_almost_equal(y[i], y_r[i])
152 152
 
153 153
     @platform_skip
  154
+    @dec.skipif(platform.machine() == "armv5tel", "See gh-413.")
154 155
     def test_special_values(self):
155 156
         xl = []
156 157
         yl = []
@@ -477,7 +478,6 @@ def g(a, b):
477 478
             return np.abs(np.complex(a, b))
478 479
 
479 480
         xa = np.array(x, dtype=np.complex)
480  
-        ya = np.array(x, dtype=np.complex)
481 481
         for i in range(len(xa)):
482 482
             ref = g(x[i], y[i])
483 483
             yield check_real_value, f, x[i], y[i], ref

0 notes on commit cce1c45

Please sign in to comment.
Something went wrong with that request. Please try again.