Skip to content

Commit 6402f56

Browse files
author
AzeezIsh
committed
Added float types method and boolean type.
1 parent 5850b9a commit 6402f56

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

tests/utility_functions.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
import pytest
22

33
import arrayfire_wrapper.lib as wrapper
4-
from arrayfire_wrapper.dtypes import Dtype, c32, c64, f16, f32, f64, s16, s32, s64, u8, u16, u32, u64
4+
from arrayfire_wrapper.dtypes import Dtype, b8, c32, c64, f16, f32, f64, s16, s32, s64, u8, u16, u32, u64
55

66

77
def check_type_supported(dtype: Dtype) -> None:
88
"""Checks to see if the specified type is supported by the current system"""
99
if dtype in [f64, c64] and not wrapper.get_dbl_support():
1010
pytest.skip("Device does not support double types")
11-
1211
if dtype == f16 and not wrapper.get_half_support():
1312
pytest.skip("Device does not support half types.")
1413

@@ -25,4 +24,8 @@ def get_real_types() -> list:
2524

2625
def get_all_types() -> list:
2726
"""Returns all types"""
28-
return [s16, s32, s64, u8, u16, u32, u64, f16, f32, f64, c32, c64]
27+
return [b8, s16, s32, s64, u8, u16, u32, u64, f16, f32, f64, c32, c64]
28+
29+
def get_float_types() -> list:
30+
"""Returns all types"""
31+
return [f16, f32, f64]

0 commit comments

Comments
 (0)