Skip to content

Commit c5c68ef

Browse files
authored
Skip tests "object has no attribute'" (#953)
* skip tests
1 parent 6733ecf commit c5c68ef

File tree

5 files changed

+550
-8
lines changed

5 files changed

+550
-8
lines changed

dpnp/linalg/dpnp_algo_linalg.pyx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,22 +83,22 @@ cpdef utils.dpnp_descriptor dpnp_cholesky(utils.dpnp_descriptor input_):
8383

8484
cpdef object dpnp_cond(object input, object p):
8585
if p in ('f', 'fro'):
86-
input = input.ravel(order='K')
86+
input = dpnp.ravel(input, order='K')
8787
sqnorm = dpnp.dot(input, input)
8888
res = dpnp.sqrt(sqnorm)
8989
ret = dpnp.array([res])
9090
elif p == numpy.inf:
9191
dpnp_sum_val = dpnp.array([dpnp.sum(dpnp.abs(input), axis=1)])
92-
ret = dpnp.array([dpnp_sum_val.max()])
92+
ret = dpnp.max(dpnp_sum_val)
9393
elif p == -numpy.inf:
9494
dpnp_sum_val = dpnp.array([dpnp.sum(dpnp.abs(input), axis=1)])
95-
ret = dpnp.array([dpnp_sum_val.min()])
95+
ret = dpnp.min(dpnp_sum_val)
9696
elif p == 1:
9797
dpnp_sum_val = dpnp.array([dpnp.sum(dpnp.abs(input), axis=0)])
98-
ret = dpnp.array([dpnp_sum_val.max()])
98+
ret = dpnp.max(dpnp_sum_val)
9999
elif p == -1:
100100
dpnp_sum_val = dpnp.array([dpnp.sum(dpnp.abs(input), axis=0)])
101-
ret = dpnp.array([dpnp_sum_val.min()])
101+
ret = dpnp.min(dpnp_sum_val)
102102
else:
103103
ret = dpnp.array([input.item(0)])
104104
return ret
@@ -225,7 +225,7 @@ cpdef object dpnp_norm(object input, ord=None, axis=None):
225225
(ord in ('f', 'fro') and ndim == 2) or
226226
(ord == 2 and ndim == 1)):
227227

228-
input = input.ravel(order='K')
228+
input = dpnp.ravel(input, order='K')
229229
sqnorm = dpnp.dot(input, input)
230230
ret = dpnp.sqrt([sqnorm])
231231
return dpnp.array([ret], dtype=res_type)

dpnp/random/dpnp_algo_random.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -836,7 +836,7 @@ cpdef utils.dpnp_descriptor dpnp_rng_shuffle(utils.dpnp_descriptor x1):
836836
cdef DPNPFuncType param1_type = dpnp_dtype_to_DPNPFuncType(x1.dtype.type)
837837
cdef size_t itemsize = x1.dtype.itemsize
838838
cdef size_t ndim = x1.ndim
839-
cdef size_t high_dim_size = len(x1.get_pyobj())
839+
cdef size_t high_dim_size = x1.get_pyobj().size
840840

841841
# get the FPTR data structure
842842
cdef DPNPFuncData kernel_data = get_dpnp_function_ptr(DPNP_FN_RNG_SHUFFLE, param1_type, param1_type)

0 commit comments

Comments
 (0)