MCPcopy
hub / github.com/numpy/numpy / test_set_element_as_object

Method test_set_element_as_object

numpy/ma/tests/test_core.py:412–423  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

410 assert_equal(filled(x[1], 0), 0)
411
412 def test_set_element_as_object(self):
413 # Tests setting elements with object
414 a = empty(1, dtype=object)
415 x = (1, 2, 3, 4, 5)
416 a[0] = x
417 assert_equal(a[0], x)
418 assert_(a[0] is x)
419
420 import datetime
421 dt = datetime.datetime.now()
422 a[0] = dt
423 assert_(a[0] is dt)
424
425 def test_indexing(self):
426 # Tests conversions and indexing

Callers

nothing calls this directly

Calls 3

assert_equalFunction · 0.90
emptyFunction · 0.85
assert_Function · 0.85

Tested by

no test coverage detected