@@ -856,13 +856,13 @@ def test_fancy_printoptions(self):
856
856
assert_equal (str (test ), control )
857
857
858
858
# Test 0-d array with multi-dimensional dtype
859
- t_2d0 = masked_array (data = (0 , [[0.0 , 0.0 , 0.0 ],
860
- [0.0 , 0.0 , 0.0 ]],
861
- 0.0 ),
862
- mask = (False , [[True , False , True ],
863
- [False , False , True ]],
864
- False ),
865
- dtype = "int, (2,3)float, float" )
859
+ t_2d0 = masked_array (data = (0 , [[0.0 , 0.0 , 0.0 ],
860
+ [0.0 , 0.0 , 0.0 ]],
861
+ 0.0 ),
862
+ mask = (False , [[True , False , True ],
863
+ [False , False , True ]],
864
+ False ),
865
+ dtype = "int, (2,3)float, float" )
866
866
control = "(0, [[--, 0.0, --], [0.0, 0.0, --]], 0.0)"
867
867
assert_equal (str (t_2d0 ), control )
868
868
@@ -970,36 +970,36 @@ def test_mvoid_print(self):
970
970
def test_mvoid_multidim_print (self ):
971
971
972
972
# regression test for gh-6019
973
- t_ma = masked_array (data = [([1 , 2 , 3 ],)],
974
- mask = [([False , True , False ],)],
975
- fill_value = ([999999 , 999999 , 999999 ],),
976
- dtype = [('a' , '<i4' , (3 ,))])
973
+ t_ma = masked_array (data = [([1 , 2 , 3 ],)],
974
+ mask = [([False , True , False ],)],
975
+ fill_value = ([999999 , 999999 , 999999 ],),
976
+ dtype = [('a' , '<i4' , (3 ,))])
977
977
assert_ (str (t_ma [0 ]) == "([1, --, 3],)" )
978
978
assert_ (repr (t_ma [0 ]) == "([1, --, 3],)" )
979
979
980
980
# additional tests with structured arrays
981
981
982
- t_2d = masked_array (data = [([[1 , 2 ], [3 , 4 ]],)],
983
- mask = [([[False , True ], [True , False ]],)],
984
- dtype = [('a' , '<i4' , (2 , 2 ))])
982
+ t_2d = masked_array (data = [([[1 , 2 ], [3 , 4 ]],)],
983
+ mask = [([[False , True ], [True , False ]],)],
984
+ dtype = [('a' , '<i4' , (2 , 2 ))])
985
985
assert_ (str (t_2d [0 ]) == "([[1, --], [--, 4]],)" )
986
986
assert_ (repr (t_2d [0 ]) == "([[1, --], [--, 4]],)" )
987
987
988
- t_0d = masked_array (data = [(1 , 2 )],
989
- mask = [(True , False )],
990
- dtype = [('a' , '<i4' ), ('b' , '<i4' )])
988
+ t_0d = masked_array (data = [(1 , 2 )],
989
+ mask = [(True , False )],
990
+ dtype = [('a' , '<i4' ), ('b' , '<i4' )])
991
991
assert_ (str (t_0d [0 ]) == "(--, 2)" )
992
992
assert_ (repr (t_0d [0 ]) == "(--, 2)" )
993
993
994
- t_2d = masked_array (data = [([[1 , 2 ], [3 , 4 ]], 1 )],
995
- mask = [([[False , True ], [True , False ]], False )],
996
- dtype = [('a' , '<i4' , (2 , 2 )), ('b' , float )])
994
+ t_2d = masked_array (data = [([[1 , 2 ], [3 , 4 ]], 1 )],
995
+ mask = [([[False , True ], [True , False ]], False )],
996
+ dtype = [('a' , '<i4' , (2 , 2 )), ('b' , float )])
997
997
assert_ (str (t_2d [0 ]) == "([[1, --], [--, 4]], 1.0)" )
998
998
assert_ (repr (t_2d [0 ]) == "([[1, --], [--, 4]], 1.0)" )
999
999
1000
- t_ne = masked_array (data = [(1 , (1 , 1 ))],
1001
- mask = [(True , (True , False ))],
1002
- dtype = [('a' , '<i4' ), ('b' , 'i4,i4' )])
1000
+ t_ne = masked_array (data = [(1 , (1 , 1 ))],
1001
+ mask = [(True , (True , False ))],
1002
+ dtype = [('a' , '<i4' ), ('b' , 'i4,i4' )])
1003
1003
assert_ (str (t_ne [0 ]) == "(--, (--, 1))" )
1004
1004
assert_ (repr (t_ne [0 ]) == "(--, (--, 1))" )
1005
1005
0 commit comments