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

Method test_set_element_as_object

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

Source from the content-addressed store, hash-verified

315 assert_equal(filled(x[1], 0), 0)
316
317 def test_set_element_as_object(self):
318 # Tests setting elements with object
319 a = empty(1, dtype=object)
320 x = (1, 2, 3, 4, 5)
321 a[0] = x
322 assert_equal(a[0], x)
323 assert_(a[0] is x)
324
325 import datetime
326 dt = datetime.datetime.now()
327 a[0] = dt
328 assert_(a[0] is dt)
329
330 def test_indexing(self):
331 # Tests conversions and indexing

Callers

nothing calls this directly

Calls 3

assert_equalFunction · 0.90
emptyFunction · 0.50
assert_Function · 0.50

Tested by

no test coverage detected