Skip to content

Commit

Permalink
TST: Add back public tests with deprecation check.
Browse files Browse the repository at this point in the history
  • Loading branch information
rossbar committed Sep 20, 2022
1 parent 7b43315 commit bd9236d
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions numpy/core/tests/test_api.py
Expand Up @@ -150,6 +150,21 @@ def test_array_impossible_casts(array):
np.array(rt, dtype="M8")


# TODO: remove when fastCopyAndTranspose deprecation expires
@pytest.mark.parametrize("a",
(
np.array(2), # 0D array
np.array([3, 2, 7, 0]), # 1D array
np.arange(6).reshape(2, 3) # 2D array
),
)
def test_fastCopyAndTranspose(a):
with pytest.deprecated_call():
b = np.fastCopyAndTranspose(a)
assert_equal(b, a.T)
assert b.flags.owndata


def test_array_astype():
a = np.arange(6, dtype='f4').reshape(2, 3)
# Default behavior: allows unsafe casts, keeps memory layout,
Expand Down

0 comments on commit bd9236d

Please sign in to comment.