MCPcopy Index your code
hub / github.com/numpy/numpy / test_scalar_copy

Method test_scalar_copy

numpy/_core/tests/test_regression.py:2337–2349  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2335 assert_(t.__hash__ is not None)
2336
2337 def test_scalar_copy(self):
2338 scalar_types = set(np._core.sctypeDict.values())
2339 values = {
2340 np.void: b"a",
2341 np.bytes_: b"a",
2342 np.str_: "a",
2343 np.datetime64: "2017-08-25",
2344 np.timedelta64: datetime.timedelta(days=1)
2345 }
2346 for sctype in scalar_types:
2347 item = sctype(values.get(sctype, 1))
2348 item2 = copy.copy(item)
2349 assert_equal(item, item2)
2350
2351 def test_void_item_memview(self):
2352 va = np.zeros(10, 'V4')

Callers

nothing calls this directly

Calls 4

assert_equalFunction · 0.90
valuesMethod · 0.45
getMethod · 0.45
copyMethod · 0.45

Tested by

no test coverage detected