summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarten van Kerkwijk <mhvk@astro.utoronto.ca>2013-10-12 23:22:27 -0400
committerMarten van Kerkwijk <mhvk@astro.utoronto.ca>2013-10-12 23:22:27 -0400
commitbeb1911b68e791923c56c9c99adfb14a036c20bd (patch)
tree1ff68109f3eb4eef8766f722bdaab34be8fa1f88
parent9f1c178b88ac566f3432a8955a9ede38a5390fa1 (diff)
downloadnumpy-beb1911b68e791923c56c9c99adfb14a036c20bd.tar.gz
Small further cleanups of ma.tests, plus correction for python3
-rw-r--r--numpy/ma/tests/test_core.py2
-rw-r--r--numpy/ma/tests/test_mrecords.py13
2 files changed, 8 insertions, 7 deletions
diff --git a/numpy/ma/tests/test_core.py b/numpy/ma/tests/test_core.py
index 90de48aeb..56eb91996 100644
--- a/numpy/ma/tests/test_core.py
+++ b/numpy/ma/tests/test_core.py
@@ -1338,7 +1338,7 @@ class TestFillingValues(TestCase):
#.....Using an object-array shouldn't matter either
fill_val = np.ndarray(shape=(1,), dtype=object)
- fill_val[0] = (-999, -12345678.9, "???")
+ fill_val[0] = (-999, -12345678.9, asbytes("???"))
fval = _check_fill_value(fill_val, object)
self.assertTrue(isinstance(fval, ndarray))
assert_equal(fval.item(), [-999, -12345678.9, asbytes("???")])
diff --git a/numpy/ma/tests/test_mrecords.py b/numpy/ma/tests/test_mrecords.py
index 02d00763d..c00407879 100644
--- a/numpy/ma/tests/test_mrecords.py
+++ b/numpy/ma/tests/test_mrecords.py
@@ -13,14 +13,14 @@ import pickle
import numpy as np
import numpy.ma as ma
from numpy import recarray
-from numpy.core.records import \
- fromrecords as recfromrecords, fromarrays as recfromarrays
+from numpy.core.records import (fromrecords as recfromrecords,
+ fromarrays as recfromarrays)
from numpy.compat import asbytes, asbytes_nested
from numpy.ma.testutils import *
from numpy.ma import masked, nomask
-from numpy.ma.mrecords import \
- MaskedRecords, mrecarray, fromarrays, fromtextfile, fromrecords, addfield
+from numpy.ma.mrecords import (MaskedRecords, mrecarray, fromarrays,
+ fromtextfile, fromrecords, addfield)
__author__ = "Pierre GF Gerard-Marchant ($Author: jarrod.millman $)"
@@ -354,8 +354,9 @@ class TestMRecords(TestCase):
mult[0] = masked
mult[1] = (1, 1, 1)
mult.filled(0)
- assert_equal_records(mult.filled(0), np.array([(0, 0, 0), (1, 1, 1)],
- dtype=mult.dtype))
+ assert_equal_records(mult.filled(0),
+ np.array([(0, 0, 0), (1, 1, 1)],
+ dtype=mult.dtype))
class TestView(TestCase):