Skip to content

Commit 6dd8e15

Browse files
committed
merge with main branch
2 parents b736052 + 81b71d2 commit 6dd8e15

File tree

3 files changed

+22
-0
lines changed

3 files changed

+22
-0
lines changed

dpctl/tensor/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,4 +212,7 @@
212212
"subtract",
213213
"equal",
214214
"sum",
215+
"real",
216+
"imag",
217+
"conj",
215218
]

dpctl/tensor/_elementwise_funcs.py

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@
117117
conj(x, out=None, order='K')
118118
119119
Computes conjugate of each element `x_i` for input array `x`.
120+
<<<<<<< HEAD
120121
121122
Args:
122123
x (usm_ndarray):
@@ -131,6 +132,8 @@
131132
usm_narray:
132133
An array containing the element-wise conjugate values. The data type
133134
of the returned array is determined by the Type Promotion Rules.
135+
=======
136+
>>>>>>> 81b71d23222f799c7e6a06bacd546204121feb7d
134137
"""
135138

136139
conj = UnaryElementwiseFunc(
@@ -224,6 +227,7 @@
224227
_exp_docstring = """
225228
exp(x, out=None, order='K')
226229
230+
<<<<<<< HEAD
227231
Computes exponential for each element `x_i` of input array `x`.
228232
229233
Args:
@@ -240,6 +244,9 @@
240244
An array containing the element-wise exponential of x.
241245
The data type of the returned array is determined by
242246
the Type Promotion Rules.
247+
=======
248+
Computes exponential for each element `x_i` for input array `x`.
249+
>>>>>>> 81b71d23222f799c7e6a06bacd546204121feb7d
243250
"""
244251

245252
exp = UnaryElementwiseFunc("exp", ti._exp_result_type, ti._exp, _exp_docstring)
@@ -283,6 +290,7 @@
283290
imag(x, out=None, order='K')
284291
285292
Computes imaginary part of each element `x_i` for input array `x`.
293+
<<<<<<< HEAD
286294
287295
Args:
288296
x (usm_ndarray):
@@ -298,6 +306,8 @@
298306
An array containing the element-wise imaginary component of input.
299307
The data type of the returned array is determined
300308
by the Type Promotion Rules.
309+
=======
310+
>>>>>>> 81b71d23222f799c7e6a06bacd546204121feb7d
301311
"""
302312

303313
imag = UnaryElementwiseFunc(
@@ -518,6 +528,7 @@
518528
real(x, out=None, order='K')
519529
520530
Computes real part of each element `x_i` for input array `x`.
531+
<<<<<<< HEAD
521532
522533
Args:
523534
x (usm_ndarray):
@@ -532,6 +543,8 @@
532543
usm_narray:
533544
An array containing the element-wise real component of input. The data
534545
type of the returned array is determined by the Type Promotion Rules.
546+
=======
547+
>>>>>>> 81b71d23222f799c7e6a06bacd546204121feb7d
535548
"""
536549

537550
real = UnaryElementwiseFunc(
@@ -551,6 +564,7 @@
551564
_sin_docstring = """
552565
sin(x, out=None, order='K')
553566
567+
<<<<<<< HEAD
554568
Computes sine for each element `x_i` of input array `x`.
555569
556570
Args:
@@ -566,6 +580,9 @@
566580
usm_narray:
567581
An array containing the element-wise sine. The data type of the
568582
returned array is determined by the Type Promotion Rules.
583+
=======
584+
Computes sin for each element `x_i` for input array `x`.
585+
>>>>>>> 81b71d23222f799c7e6a06bacd546204121feb7d
569586
"""
570587

571588
sin = UnaryElementwiseFunc("sin", ti._sin_result_type, ti._sin, _sin_docstring)

dpctl/tests/elementwise/test_sincos.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ def test_sincos_out_type(np_call, dpt_call, dtype):
3636
skip_if_dtype_not_supported(dtype, q)
3737

3838
X = dpt.asarray(0, dtype=dtype, sycl_queue=q)
39+
3940
expected_dtype = np_call(np.array(0, dtype=dtype)).dtype
4041
expected_dtype = _map_to_device_dtype(expected_dtype, q.sycl_device)
4142
assert dpt_call(X).dtype == expected_dtype
@@ -91,6 +92,7 @@ def test_sincos_usm_type(np_call, dpt_call, usm_type):
9192
X[..., 1::2] = np.pi / 3
9293

9394
Y = dpt_call(X)
95+
9496
assert Y.usm_type == X.usm_type
9597
assert Y.sycl_queue == X.sycl_queue
9698
assert Y.flags.c_contiguous

0 commit comments

Comments
 (0)