summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYashasvi Misra <yashasvimisra_bh@srmuniv.edu.in>2021-08-26 18:40:55 +0000
committerYashasvi Misra <yashasvimisra_bh@srmuniv.edu.in>2021-08-26 18:40:55 +0000
commit147f651ac05e08bfbc4e17ffc1b7673ab4c55796 (patch)
tree48ab721fdc9a888b099f8943fcc42b84fb4eb07e
parentaf0fe021058c045748e0117eee4e856c60c879c5 (diff)
downloadnumpy-147f651ac05e08bfbc4e17ffc1b7673ab4c55796.tar.gz
add test
-rw-r--r--numpy/core/tests/test_casting_unittests.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/numpy/core/tests/test_casting_unittests.py b/numpy/core/tests/test_casting_unittests.py
index 3f67f1832..5874c53a3 100644
--- a/numpy/core/tests/test_casting_unittests.py
+++ b/numpy/core/tests/test_casting_unittests.py
@@ -190,6 +190,12 @@ class TestCasting:
return arr1, arr2, values
+ res = np.array([0, 3, -7], dtype=np.int8).view(bool)
+ expected = [0, 1, 1]
+
+ def conversion(self, res, expected):
+ assert_array_equal(res, expected)
+
def get_data_variation(self, arr1, arr2, aligned=True, contig=True):
"""
Returns a copy of arr1 that may be non-contiguous or unaligned, and a