Skip to content

Commit f1d6115

Browse files
author
Vahid Tavanashad
committed
fix a bug
1 parent 408756b commit f1d6115

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

dpnp/tests/test_mathematical.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -751,16 +751,14 @@ def test_errors(self):
751751

752752

753753
class TestFix:
754-
def get_output_data_type(self, dtype, device):
754+
def get_output_data_type(self, dtype):
755755
if dpnp.can_cast(dtype, dpnp.float16):
756756
return dpnp.float16
757757
if dpnp.can_cast(dtype, dpnp.float32):
758758
return dpnp.float32
759759
if dpnp.can_cast(dtype, dpnp.float64):
760760
return dpnp.float64
761761

762-
return dpnp.default_float_type(device)
763-
764762
@pytest.mark.parametrize(
765763
"dt", get_all_dtypes(no_none=True, no_complex=True)
766764
)
@@ -790,8 +788,8 @@ def test_out(self, a_dt):
790788

791789
# numpy output has the same dtype as input
792790
# dpnp output always has a floating point dtype
793-
out_dt = self.get_output_data_type(a.dtype, a.device)
794-
out = numpy.zeros_like(a, dtype=out_dt)
791+
dt_out = self.get_output_data_type(a.dtype)
792+
out = numpy.zeros_like(a, dtype=dt_out)
795793
iout = dpnp.array(out)
796794

797795
result = dpnp.fix(ia, out=iout)

0 commit comments

Comments
 (0)