Skip to content

Commit

Permalink
Fix test for sorting with other-endian field.
Browse files Browse the repository at this point in the history
  • Loading branch information
teoliphant committed Jan 19, 2010
1 parent d61aaf7 commit a9905df
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions numpy/core/tests/test_multiarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -414,11 +414,13 @@ def test_sort_order(self):
strtype = '>i2'
else:
strtype = '<i2'
mydtype = [('name', 'S5'),('col2',strtype)]
r = np.array([('a', 1),('b', 255), ('c', 3), ('d', 258)],
dtype=[('name', 'S5'),('col2',strtype)])
dtype= mydtype)
r.sort(order='col2')
assert_equal(r['col2'], [1, 3, 255, 258])
assert_equal(r, [('a', 1), ('c', 3), ('b', 255), ('d', 258)])
assert_equal(r, np.array([('a', 1), ('c', 3), ('b', 255), ('d', 258)],
dtype=mydtype))

def test_argsort(self):
# all c scalar argsorts use the same code with different types
Expand Down

0 comments on commit a9905df

Please sign in to comment.