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

Method test_filled_with_mvoid

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

Source from the content-addressed store, hash-verified

777 np.array([(1, '1', 1.)], dtype=flexi.dtype))
778
779 def test_filled_with_mvoid(self):
780 # Test filled w/ mvoid
781 ndtype = [('a', int), ('b', float)]
782 a = mvoid((1, 2.), mask=[(0, 1)], dtype=ndtype)
783 # Filled using default
784 test = a.filled()
785 assert_equal(tuple(test), (1, default_fill_value(1.)))
786 # Explicit fill_value
787 test = a.filled((-1, -1))
788 assert_equal(tuple(test), (1, -1))
789 # Using predefined filling values
790 a.fill_value = (-999, -999)
791 assert_equal(tuple(a.filled()), (1, -999))
792
793 def test_filled_with_nested_dtype(self):
794 # Test filled w/ nested dtype

Callers

nothing calls this directly

Calls 4

mvoidClass · 0.90
assert_equalFunction · 0.90
default_fill_valueFunction · 0.90
filledMethod · 0.45

Tested by

no test coverage detected