MCPcopy Create free account
hub / github.com/numpy/numpy / test_f_inout_23seq

Method test_f_inout_23seq

numpy/f2py/tests/test_array_from_pyobj.py:445–461  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

443 raise SystemError("intent(inout) should have failed on sequence")
444
445 def test_f_inout_23seq(self):
446 obj = np.array(self.num23seq, dtype=self.type.dtype, order="F")
447 shape = (len(self.num23seq), len(self.num23seq[0]))
448 a = self.array(shape, intent.in_.inout, obj)
449 assert a.has_shared_memory()
450
451 obj = np.array(self.num23seq, dtype=self.type.dtype, order="C")
452 shape = (len(self.num23seq), len(self.num23seq[0]))
453 try:
454 a = self.array(shape, intent.in_.inout, obj)
455 except ValueError as msg:
456 if not str(msg).startswith(
457 "failed to initialize intent(inout) array"):
458 raise
459 else:
460 raise SystemError(
461 "intent(inout) should have failed on improper array")
462
463 def test_c_inout_23seq(self):
464 obj = np.array(self.num23seq, dtype=self.type.dtype)

Callers

nothing calls this directly

Calls 2

has_shared_memoryMethod · 0.80
startswithMethod · 0.80

Tested by

no test coverage detected