コード例 #1
0
ファイル: test__iotools.py プロジェクト: jaarfi/Raytracer
 def test_has_nested_dtype(self):
     "Test has_nested_dtype"
     ndtype = np.dtype(float)
     assert_equal(has_nested_fields(ndtype), False)
     ndtype = np.dtype([('A', '|S3'), ('B', float)])
     assert_equal(has_nested_fields(ndtype), False)
     ndtype = np.dtype([('A', int), ('B', [('BA', float), ('BB', '|S1')])])
     assert_equal(has_nested_fields(ndtype), True)
コード例 #2
0
ファイル: test__iotools.py プロジェクト: Garrett-R/numpy
 def test_has_nested_dtype(self):
     "Test has_nested_dtype"
     ndtype = np.dtype(np.float)
     assert_equal(has_nested_fields(ndtype), False)
     ndtype = np.dtype([('A', '|S3'), ('B', float)])
     assert_equal(has_nested_fields(ndtype), False)
     ndtype = np.dtype([('A', int), ('B', [('BA', float), ('BB', '|S1')])])
     assert_equal(has_nested_fields(ndtype), True)
コード例 #3
0
 def test_has_nested_dtype(self):
     "Test has_nested_dtype"
     ndtype = np.dtype(float)
     assert_equal(has_nested_fields(ndtype), False)
     ndtype = np.dtype([("A", "|S3"), ("B", float)])
     assert_equal(has_nested_fields(ndtype), False)
     ndtype = np.dtype([("A", int), ("B", [("BA", float), ("BB", "|S1")])])
     assert_equal(has_nested_fields(ndtype), True)
コード例 #4
0
ファイル: test__iotools.py プロジェクト: kidaa/Neuroimaging
 def test_has_nested_dtype(self):
     "Test has_nested_dtype"
     ndtype = np.dtype(np.float)
     assert_equal(has_nested_fields(ndtype), False)
     ndtype = np.dtype([("A", "|S3"), ("B", float)])
     assert_equal(has_nested_fields(ndtype), False)
     ndtype = np.dtype([("A", int), ("B", [("BA", float), ("BB", "|S1")])])
     assert_equal(has_nested_fields(ndtype), True)