|
Expand Up
|
@@ -1715,7 +1715,7 @@ def test_otypes(self): |
|
|
x = np.arange(5) |
|
|
assert_array_equal(f(x), x) |
|
|
|
|
|
def test_otypes_object_ticket_21274(self): |
|
|
def test_otypes_object_28624(self): |
|
|
# with object otype, the vectorized function should return y |
|
|
# wrapped into an object array |
|
|
y = np.arange(3) |
|
Expand All
|
@@ -1724,20 +1724,8 @@ def test_otypes_object_ticket_21274(self): |
|
|
assert f(None).item() is y |
Comment thread
francois-rozet marked this conversation as resolved.
Resolved
Uh oh!
There was an error while loading. Please reload this page.
|
|
|
assert f([None]).item() is y |
|
|
|
|
|
def test_otypes_list_ticket_28624(self): |
|
|
# with a list output, the vectorized function should return y |
|
|
# wrapped into an object array |
|
|
y = [1, 2, 3] |
|
|
f = vectorize(lambda x: y) |
|
|
|
|
|
assert f(None).item() is y |
|
|
assert f([None]).item() is y |
|
|
|
|
|
def test_otypes_nested_list_ticket_28624(self): |
|
|
# with a list output, the vectorized function should return y |
|
|
# wrapped into an object array |
|
|
y = [1, 2, [3, 4]] |
|
|
f = vectorize(lambda x: y) |
|
|
f = vectorize(lambda x: y, otypes=[object]) |
|
|
|
|
|
assert f(None).item() is y |
|
|
assert f([None]).item() is y |
|
Expand Down
|
|