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

Method has_shared_memory

numpy/f2py/tests/test_array_from_pyobj.py:363–370  ·  view source on GitHub ↗

Check that created array shares data with input array.

(self)

Source from the content-addressed store, hash-verified

361 return str(self.arr)
362
363 def has_shared_memory(self):
364 """Check that created array shares data with input array."""
365 if self.obj is self.arr:
366 return True
367 if not isinstance(self.obj, np.ndarray):
368 return False
369 obj_attr = wrap.array_attrs(self.obj)
370 return obj_attr[0] == self.arr_attr[0]
371
372
373class TestIntent:

Callers 15

__init__Method · 0.95
test_in_from_2seqMethod · 0.80
test_in_nocopyMethod · 0.80
test_inout_2seqMethod · 0.80
test_f_inout_23seqMethod · 0.80
test_c_inout_23seqMethod · 0.80
test_c_in_from_23seqMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected