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

Method test_scalar_copy

numpy/core/tests/test_regression.py:2346–2357  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2344 assert_(t.__hash__ != None)
2345
2346 def test_scalar_copy(self):
2347 scalar_types = set(np.sctypeDict.values())
2348 values = {
2349 np.void: b"a",
2350 np.bytes_: b"a",
2351 np.str_: "a",
2352 np.datetime64: "2017-08-25",
2353 }
2354 for sctype in scalar_types:
2355 item = sctype(values.get(sctype, 1))
2356 item2 = copy.copy(item)
2357 assert_equal(item, item2)
2358
2359 def test_void_item_memview(self):
2360 va = np.zeros(10, 'V4')

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected