Skip to content

Commit 5a2913f

Browse files
authored
Resolve logically dead code from Coverity report (#1541)
* Resolved logically dead code from coverity report * Fixed tests * Skip fmod tests with rhs=0.3 * Appled review comments
1 parent ff71682 commit 5a2913f

File tree

6 files changed

+424
-222
lines changed

6 files changed

+424
-222
lines changed

dpnp/dpnp_algo/dpnp_algo.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ cpdef dpnp_queue_initialize():
219219
# TODO:
220220
# choose seed number as is in numpy
221221
seed_from_time = time(NULL)
222-
dpnp_rng_srand_c(seed_from_time)
222+
dpnp_rng_srand_c(< size_t > seed_from_time)
223223

224224

225225
"""

dpnp/dpnp_iface_bitwise.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def bitwise_and(
9090
Parameters `x1` and `x2` are supported as either scalar, :class:`dpnp.ndarray`
9191
or :class:`dpctl.tensor.usm_ndarray`, but both `x1` and `x2` can not be scalars at the same time.
9292
Parameters `where`, `dtype` and `subok` are supported with their default values.
93-
Keyword arguments `kwargs` are currently unsupported.
93+
Keyword argument `kwargs` is currently unsupported.
9494
Otherwise the function will be executed sequentially on CPU.
9595
Data type of input arrays `x1` and `x2` has to be an integer or boolean data type.
9696
@@ -160,7 +160,7 @@ def bitwise_or(
160160
Parameters `x1` and `x2` are supported as either scalar, :class:`dpnp.ndarray`
161161
or :class:`dpctl.tensor.usm_ndarray`, but both `x1` and `x2` can not be scalars at the same time.
162162
Parameters `where`, `dtype` and `subok` are supported with their default values.
163-
Keyword arguments `kwargs` are currently unsupported.
163+
Keyword argument `kwargs` is currently unsupported.
164164
Otherwise the function will be executed sequentially on CPU.
165165
Data type of input arrays `x1` and `x2` has to be an integer or boolean data type.
166166
@@ -225,7 +225,7 @@ def bitwise_xor(
225225
Parameters `x1` and `x2` are supported as either scalar, :class:`dpnp.ndarray`
226226
or :class:`dpctl.tensor.usm_ndarray`, but both `x1` and `x2` can not be scalars at the same time.
227227
Parameters `where`, `dtype` and `subok` are supported with their default values.
228-
Keyword arguments `kwargs` are currently unsupported.
228+
Keyword argument `kwargs` is currently unsupported.
229229
Otherwise the function will be executed sequentially on CPU.
230230
Data type of input arrays `x1` and `x2` has to be an integer or boolean data type.
231231
@@ -286,7 +286,7 @@ def invert(
286286
Parameter `x` is supported as either :class:`dpnp.ndarray`
287287
or :class:`dpctl.tensor.usm_ndarray`.
288288
Parameters `where`, `dtype` and `subok` are supported with their default values.
289-
Keyword arguments `kwargs` are currently unsupported.
289+
Keyword argument `kwargs` is currently unsupported.
290290
Otherwise the function will be executed sequentially on CPU.
291291
Data type of input array `x` has to be an integer data type.
292292
@@ -358,7 +358,7 @@ def left_shift(
358358
Parameters `x1` and `x2` are supported as either scalar, :class:`dpnp.ndarray`
359359
or :class:`dpctl.tensor.usm_ndarray`, but both `x1` and `x2` can not be scalars at the same time.
360360
Parameters `where`, `dtype` and `subok` are supported with their default values.
361-
Keyword arguments `kwargs` are currently unsupported.
361+
Keyword argument `kwargs` is currently unsupported.
362362
Otherwise the function will be executed sequentially on CPU.
363363
Input data is supported as integer only.
364364
@@ -421,7 +421,7 @@ def right_shift(
421421
Parameters `x1` and `x2` are supported as either scalar, :class:`dpnp.ndarray`
422422
or :class:`dpctl.tensor.usm_ndarray`, but both `x1` and `x2` can not be scalars at the same time.
423423
Parameters `where`, `dtype` and `subok` are supported with their default values.
424-
Keyword arguments `kwargs` are currently unsupported.
424+
Keyword argument `kwargs` is currently unsupported.
425425
Otherwise the function will be executed sequentially on CPU.
426426
Input data is supported as integer only.
427427

0 commit comments

Comments
 (0)