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

Method test_filled_with_mvoid

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

Source from the content-addressed store, hash-verified

875 np.array([(1, '1', 1.)], dtype=flexi.dtype))
876
877 def test_filled_with_mvoid(self):
878 # Test filled w/ mvoid
879 ndtype = [('a', int), ('b', float)]
880 a = mvoid((1, 2.), mask=[(0, 1)], dtype=ndtype)
881 # Filled using default
882 test = a.filled()
883 assert_equal(tuple(test), (1, default_fill_value(1.)))
884 # Explicit fill_value
885 test = a.filled((-1, -1))
886 assert_equal(tuple(test), (1, -1))
887 # Using predefined filling values
888 a.fill_value = (-999, -999)
889 assert_equal(tuple(a.filled()), (1, -999))
890
891 def test_filled_with_nested_dtype(self):
892 # 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