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

Method test_fillvalue_as_arguments

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

Source from the content-addressed store, hash-verified

2362 assert_equal(f[-1], default_fill_value(1.))
2363
2364 def test_fillvalue_as_arguments(self):
2365 # Test adding a fill_value parameter to empty/ones/zeros
2366 a = empty(3, fill_value=999.)
2367 assert_equal(a.fill_value, 999.)
2368
2369 a = ones(3, fill_value=999., dtype=float)
2370 assert_equal(a.fill_value, 999.)
2371
2372 a = zeros(3, fill_value=0., dtype=complex)
2373 assert_equal(a.fill_value, 0.)
2374
2375 a = identity(3, fill_value=0., dtype=complex)
2376 assert_equal(a.fill_value, 0.)
2377
2378 def test_shape_argument(self):
2379 # Test that shape can be provides as an argument

Callers

nothing calls this directly

Calls 5

assert_equalFunction · 0.90
onesFunction · 0.90
identityFunction · 0.90
emptyFunction · 0.50
zerosFunction · 0.50

Tested by

no test coverage detected