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

Method test_keywords2_ticket_2100

numpy/lib/tests/test_function_base.py:1486–1501  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1484 raise AssertionError()
1485
1486 def test_keywords2_ticket_2100(self):
1487 # Test kwarg support: enhancement ticket 2100
1488
1489 def foo(a, b=1):
1490 return a + b
1491
1492 f = vectorize(foo)
1493 args = np.array([1, 2, 3])
1494 r1 = f(a=args)
1495 r2 = np.array([2, 3, 4])
1496 assert_array_equal(r1, r2)
1497 r1 = f(b=1, a=args)
1498 assert_array_equal(r1, r2)
1499 r1 = f(args, b=2)
1500 r2 = np.array([3, 4, 5])
1501 assert_array_equal(r1, r2)
1502
1503 def test_keywords3_ticket_2100(self):
1504 # Test excluded with mixed positional and kwargs: ticket 2100

Callers

nothing calls this directly

Calls 3

vectorizeClass · 0.90
assert_array_equalFunction · 0.90
fFunction · 0.85

Tested by

no test coverage detected