8000 TST: fix #6542, add tests to check non-iterable argument raises in hstack and related functions. by gkBCCN · Pull Request #7342 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

TST: fix #6542, add tests to check non-iterable argument raises in hstack and related functions. #7342

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 21 commits into from
Closed
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
16416f0
TST: Install `pytz` in the CI.
jakirkham Feb 25, 2016
8e05d78
TST: Fix #6542: Add test for non-iterable input...
gkBCCN Feb 25, 2016
bdcb221
DOC: Fixed math rendering in tensordot docs.
simongibbons Feb 25, 2016
a3e12c9
TST: Fix #6542: Add test for non-iterable input...
gkBCCN Feb 25, 2016
d6407a1
Merge pull request #7338 from jakirkham/use_pytz_ci
charris Feb 25, 2016
89d95a0
Merge pull request #7340 from simongibbons/tensordot_doc_fix
njsmith Feb 25, 2016
2556b9f
DOC: Fix more typos in docs and comments.
dongjoon-hyun Feb 21, 2016
c303c9b
Merge pull request #7344 from dongjoon-hyun/fix_typos
njsmith Feb 25, 2016
6f6f03d
TST: Fix some MA tests to avoid looking at the .data attribute
ahaldane Feb 14, 2016
693fa3f
Maint: Removed extra space from `ureduce`
madphysicist Feb 26, 2016
4123a2d
Merge pull request #7348 from madphysicist/patch-1
charris Feb 26, 2016
fd19bf3
MAINT: Hide nan warnings for internal ma computations
ahaldane Feb 14, 2016
fe25160
Merge pull request #7351 from ahaldane/ma_fix_1_datatest
charris Feb 26, 2016
140552d
Merge pull request #7349 from ahaldane/ma_fix_3_ignorenan
charris Feb 27, 2016
8f64328
TST: added a test for constant padding on 4 sides of a 2d array
chiffa Feb 27, 2016
3db32cb
BUG: constant padding expected wrong type in constant_values
chiffa Feb 27, 2016
e90e254
Merge pull request #7358 from chiffa/master
njsmith Feb 28, 2016
5e75d7a
TST: Fix #6542: Add test for non-iterable input...
gkBCCN Feb 25, 2016
79a6d4f
TST: Fix #6542: Add test for non-iterable input...
gkBCCN Feb 25, 2016
ac6141b
TST: Fix #6542: TestVsplit, TestDsplit updated...
gkBCCN Feb 28, 2016
519946e
Merge branch 'bug-fix-6542' ...
gkBCCN Feb 28, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
TST: Fix some MA tests to avoid looking at the .data attribute
The MaskedArray.data attribute is unreliable for tests because it can
contain arbitraty junk data at masked positions. Instead, all
MaskedArray tests should look at marr.filled(0) to check if we got the
same result.
  • Loading branch information
ahaldane committed Feb 26, 2016
commit 6f6f03dc961c15b336242c6600596a8f882ca194
18 changes: 9 additions & 9 deletions numpy/ma/tests/test_extras.py
Original file line number Diff line number Diff line change
Expand Up @@ -998,7 +998,7 @@ def test_ediff1d(self):
control = array([1, 1, 1, 4], mask=[1, 0, 0, 1])
test = ediff1d(x)
assert_equal(test, control)
assert_equal(test.data, control.data)
assert_equal(test.filled(0), control.filled(0))
assert_equal(test.mask, control.mask)

def test_ediff1d_tobegin(self):
Expand All @@ -1007,13 +1007,13 @@ def test_ediff1d_tobegin(self):
test = ediff1d(x, to_begin=masked)
control = array([0, 1, 1, 1, 4], mask=[1, 1, 0, 0, 1])
assert_equal(test, control)
assert_equal(test.data, control.data)
assert_equal(test.filled(0), control.filled(0))
assert_equal(test.mask, control.mask)
#
test = ediff1d(x, to_begin=[1, 2, 3])
control = array([1, 2, 3, 1, 1, 1, 4], mask=[0, 0, 0, 1, 0, 0, 1])
assert_equal(test, control)
assert_equal(test.data, control.data)
assert_equal(test.filled(0), control.filled(0))
assert_equal(test.mask, control.mask)

def test_ediff1d_toend(self):
Expand All @@ -1022,13 +1022,13 @@ def test_ediff1d_toend(self):
test = ediff1d(x, to_end=masked)
control = array([1, 1, 1, 4, 0], mask=[1, 0, 0, 1, 1])
assert_equal(test, control)
assert_equal(test.data, control.data)
assert_equal(test.filled(0), control.filled(0))
assert_equal(test.mask, control.mask)
#
test = ediff1d(x, to_end=[1, 2, 3])
control = array([1, 1, 1, 4, 1, 2, 3], mask=[1, 0, 0, 1, 0, 0, 0])
assert_equal(test, control)
assert_equal(test.data, control.data)
assert_equal(test.filled(0), control.filled(0))
assert_equal(test.mask, control.mask)

def test_ediff1d_tobegin_toend(self):
Expand All @@ -1037,14 +1037,14 @@ def test_ediff1d_tobegin_toend(self):
test = ediff1d(x, to_end=masked, to_begin=masked)
control = array([0, 1, 1, 1, 4, 0], mask=[1, 1, 0, 0, 1, 1])
assert_equal(test, control)
assert_equal(test.data, control.data)
assert_equal(test.filled(0), control.filled(0))
assert_equal(test.mask, control.mask)
#
test = ediff1d(x, to_end=[1, 2, 3], to_begin=masked)
control = array([0, 1, 1, 1, 4, 1, 2, 3],
mask=[1, 1, 0, 0, 1, 0, 0, 0])
assert_equal(test, control)
assert_equal(test.data, control.data)
assert_equal(test.filled(0), control.filled(0))
assert_equal(test.mask, control.mask)

def test_ediff1d_ndarray(self):
Expand All @@ -1054,13 +1054,13 @@ def test_ediff1d_ndarray(self):
control = array([1, 1, 1, 1], mask=[0, 0, 0, 0])
assert_equal(test, control)
self.assertTrue(isinstance(test, MaskedArray))
assert_equal(test.data, control.data)
assert_equal(test.filled(0), control.filled(0))
assert_equal(test.mask, control.mask)
#
test = ediff1d(x, to_end=masked, to_begin=masked)
control = array([0, 1, 1, 1, 1, 0], mask=[1, 0, 0, 0, 0, 1])
self.assertTrue(isinstance(test, MaskedArray))
assert_equal(test.data, control.data)
assert_equal(test.filled(0), control.filled(0))
assert_equal(test.mask, control.mask)

def test_intersect1d(self):
Expand Down
0