~ubuntu-branches/ubuntu/trusty/python-numpy/trusty-updates

« back to all changes in this revision

Viewing changes to numpy/lib/tests/test_index_tricks.py

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2013-01-28 19:03:02 UTC
  • mfrom: (7.1.13 experimental)
  • Revision ID: package-import@ubuntu.com-20130128190302-1kyak9j26902djjg
Tags: 1:1.7.0~rc1-1ubuntu1
Merge with Debian; remaining changes:

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
import numpy as np
3
3
from numpy import ( array, ones, r_, mgrid, unravel_index, zeros, where,
4
4
                    ndenumerate, fill_diagonal, diag_indices,
5
 
                    diag_indices_from, s_, index_exp, ndindex )
 
5
                    diag_indices_from, s_, index_exp )
6
6
 
7
7
class TestRavelUnravelIndex(TestCase):
8
8
    def test_basic(self):
237
237
    assert_array_equal(c, np.arange(4))
238
238
 
239
239
 
240
 
def test_ndindex():
241
 
    x = list(np.ndindex(1, 2, 3))
242
 
    expected = [ix for ix, e in np.ndenumerate(np.zeros((1, 2, 3)))]
243
 
    assert_array_equal(x, expected)
244
 
 
245
 
 
246
240
if __name__ == "__main__":
247
241
    run_module_suite()