MCPcopy Create free account
hub / github.com/PyTables/PyTables / setup01_char_nc

Method setup01_char_nc

tables/tests/test_array.py:376–390  ·  view source on GitHub ↗

Data integrity during recovery (non-contiguous character objects)

(self)

Source from the content-addressed store, hash-verified

374 Path(filename).unlink()
375
376 def setup01_char_nc(self):
377 """Data integrity during recovery (non-contiguous character objects)"""
378
379 if not isinstance(self.tupleChar, np.ndarray):
380 a = np.array(self.tupleChar, dtype="S")
381 else:
382 a = self.tupleChar
383 if a.ndim == 0:
384 b = a.copy()
385 else:
386 b = a[::2]
387 # Ensure that this numpy string is non-contiguous
388 if len(b) > 1:
389 self.assertEqual(b.flags.contiguous, False)
390 return b
391
392 def test01_char_nc(self):
393 b = self.setup01_char_nc()

Callers 3

test01_char_ncMethod · 0.95

Calls 1

copyMethod · 0.45

Tested by

no test coverage detected