@@ -54,7 +54,7 @@ class dpnp_array:
54
54
Multi-dimensional array object.
55
55
56
56
This is a wrapper around dpctl.tensor.usm_ndarray that provides
57
- methods to be compliant with original Numpy .
57
+ methods to be compliant with original NumPy .
58
58
59
59
"""
60
60
@@ -137,15 +137,15 @@ def usm_type(self):
137
137
return self ._array_obj .usm_type
138
138
139
139
def __abs__ (self ):
140
- r"""Return \|self\|."""
140
+ r"""Return `` \|self\|`` ."""
141
141
return dpnp .abs (self )
142
142
143
143
def __add__ (self , other ):
144
- """Return self+value."""
144
+ """Return `` self+value`` ."""
145
145
return dpnp .add (self , other )
146
146
147
147
def __and__ (self , other ):
148
- """Return self&value."""
148
+ """Return `` self&value`` ."""
149
149
return dpnp .bitwise_and (self , other )
150
150
151
151
# '__array__',
@@ -197,7 +197,7 @@ def __float__(self):
197
197
return self ._array_obj .__float__ ()
198
198
199
199
def __floordiv__ (self , other ):
200
- """Return self//value."""
200
+ """Return `` self//value`` ."""
201
201
return dpnp .floor_divide (self , other )
202
202
203
203
# '__format__',
@@ -208,7 +208,7 @@ def __ge__(self, other):
208
208
# '__getattribute__',
209
209
210
210
def __getitem__ (self , key ):
211
- """Return self[key]."""
211
+ """Return `` self[key]`` ."""
212
212
key = _get_unwrapped_index_key (key )
213
213
214
214
item = self ._array_obj .__getitem__ (key )
@@ -229,34 +229,34 @@ def __gt__(self, other):
229
229
# '__hash__',
230
230
231
231
def __iadd__ (self , other ):
232
- """Return self+=value."""
232
+ """Return `` self+=value`` ."""
233
233
dpnp .add (self , other , out = self )
234
234
return self
235
235
236
236
def __iand__ (self , other ):
237
- """Return self&=value."""
237
+ """Return `` self&=value`` ."""
238
238
dpnp .bitwise_and (self , other , out = self )
239
239
return self
240
240
241
241
def __ifloordiv__ (self , other ):
242
- """Return self//=value."""
242
+ """Return `` self//=value`` ."""
243
243
dpnp .floor_divide (self , other , out = self )
244
244
return self
245
245
246
246
def __ilshift__ (self , other ):
247
- """Return self<<=value."""
247
+ """Return `` self<<=value`` ."""
248
248
dpnp .left_shift (self , other , out = self )
249
249
return self
250
250
251
251
# '__imatmul__',
252
252
253
253
def __imod__ (self , other ):
254
- """Return self%=value."""
254
+ """Return `` self%=value`` ."""
255
255
dpnp .remainder (self , other , out = self )
256
256
return self
257
257
258
258
def __imul__ (self , other ):
259
- """Return self*=value."""
259
+ """Return `` self*=value`` ."""
260
260
dpnp .multiply (self , other , out = self )
261
261
return self
262
262
@@ -270,51 +270,51 @@ def __int__(self):
270
270
return self ._array_obj .__int__ ()
271
271
272
272
def __invert__ (self ):
273
- """Return ~self."""
273
+ """Return `` ~self`` ."""
274
274
return dpnp .invert (self )
275
275
276
276
def __ior__ (self , other ):
277
- """Return self|=value."""
277
+ """Return `` self|=value`` ."""
278
278
dpnp .bitwise_or (self , other , out = self )
279
279
return self
280
280
281
281
def __ipow__ (self , other ):
282
- """Return self**=value."""
282
+ """Return `` self**=value`` ."""
283
283
dpnp .power (self , other , out = self )
284
284
return self
285
285
286
286
def __irshift__ (self , other ):
287
- """Return self>>=value."""
287
+ """Return `` self>>=value`` ."""
288
288
dpnp .right_shift (self , other , out = self )
289
289
return self
290
290
291
291
def __isub__ (self , other ):
292
- """Return self-=value."""
292
+ """Return `` self-=value`` ."""
293
293
dpnp .subtract (self , other , out = self )
294
294
return self
295
295
296
296
# '__iter__',
297
297
298
298
def __itruediv__ (self , other ):
299
- """Return self/=value."""
299
+ """Return `` self/=value`` ."""
300
300
dpnp .true_divide (self , other , out = self )
301
301
return self
302
302
303
303
def __ixor__ (self , other ):
304
- """Return self^=value."""
304
+ """Return `` self^=value`` ."""
305
305
dpnp .bitwise_xor (self , other , out = self )
306
306
return self
307
307
308
308
def __le__ (self , other ):
309
309
return dpnp .less_equal (self , other )
310
310
311
311
def __len__ (self ):
312
- """Return len(self)."""
312
+ """Return `` len(self)`` ."""
313
313
314
314
return self ._array_obj .__len__ ()
315
315
316
316
def __lshift__ (self , other ):
317
- """Return self<<value."""
317
+ """Return `` self<<value`` ."""
318
318
return dpnp .left_shift (self , other )
319
319
320
320
def __lt__ (self , other ):
@@ -324,32 +324,32 @@ def __matmul__(self, other):
324
324
return dpnp .matmul (self , other )
325
325
326
326
def __mod__ (self , other ):
327
- """Return self%value."""
327
+ """Return `` self%value`` ."""
328
328
return dpnp .remainder (self , other )
329
329
330
330
def __mul__ (self , other ):
331
- """Return self*value."""
331
+ """Return `` self*value`` ."""
332
332
return dpnp .multiply (self , other )
333
333
334
334
def __ne__ (self , other ):
335
335
return dpnp .not_equal (self , other )
336
336
337
337
def __neg__ (self ):
338
- """Return -self."""
338
+ """Return `` -self`` ."""
339
339
return dpnp .negative (self )
340
340
341
341
# '__new__',
342
342
343
343
def __or__ (self , other ):
344
- """Return self|value."""
344
+ """Return `` self|value`` ."""
345
345
return dpnp .bitwise_or (self , other )
346
346
347
347
def __pos__ (self ):
348
- """Return +self."""
348
+ """Return `` +self`` ."""
349
349
return dpnp .positive (self )
350
350
351
351
def __pow__ (self , other ):
352
- """Return self**value."""
352
+ """Return `` self**value`` ."""
353
353
return dpnp .power (self , other )
354
354
355
355
def __radd__ (self , other ):
@@ -390,7 +390,7 @@ def __rrshift__(self, other):
390
390
return dpnp .right_shift (other , self )
391
391
392
392
def __rshift__ (self , other ):
393
- """Return self>>value."""
393
+ """Return `` self>>value`` ."""
394
394
return dpnp .right_shift (self , other )
395
395
396
396
def __rsub__ (self , other ):
@@ -405,7 +405,7 @@ def __rxor__(self, other):
405
405
# '__setattr__',
406
406
407
407
def __setitem__ (self , key , val ):
408
- """Set self[key] to value."""
408
+ """Set `` self[key]`` to value."""
409
409
key = _get_unwrapped_index_key (key )
410
410
411
411
if isinstance (val , dpnp_array ):
@@ -432,17 +432,17 @@ def __str__(self):
432
432
return self ._array_obj .__str__ ()
433
433
434
434
def __sub__ (self , other ):
435
- """Return self-value."""
435
+ """Return `` self-value`` ."""
436
436
return dpnp .subtract (self , other )
437
437
438
438
# '__subclasshook__',
439
439
440
440
def __truediv__ (self , other ):
441
- """Return self/value."""
441
+ """Return `` self/value`` ."""
442
442
return dpnp .true_divide (self , other )
443
443
444
444
def __xor__ (self , other ):
445
- """Return self^value."""
445
+ """Return `` self^value`` ."""
446
446
return dpnp .bitwise_xor (self , other )
447
447
448
448
@staticmethod
@@ -558,8 +558,10 @@ def astype(self, dtype, order="K", casting="unsafe", subok=True, copy=True):
558
558
- 'unsafe' means any data conversions may be done.
559
559
560
560
copy : bool, optional
561
- By default, astype always returns a newly allocated array. If this is set to false, and the dtype,
562
- order, and subok requirements are satisfied, the input array is returned instead of a copy.
561
+ By default, ``astype`` always returns a newly allocated array. If
562
+ this is set to ``False``, and the `dtype`, `order`, and `subok`
563
+ requirements are satisfied, the input array is returned instead of
564
+ a copy.
563
565
564
566
Returns
565
567
-------
@@ -1323,9 +1325,9 @@ def transpose(self, *axes):
1323
1325
----------
1324
1326
axes : None, tuple or list of ints, n ints, optional
1325
1327
* ``None`` or no argument: reverses the order of the axes.
1326
- * tuple or list of ints : `i` in the `j`-th place in the tuple/list
1327
- means that the array’s `i`-th axis becomes the transposed
1328
- array’s `j`-th axis.
1328
+ * tuple or list of integers : `i` in the `j`-th place in the
1329
+ tuple/list means that the array’s `i`-th axis becomes the
1330
+ transposed array’s `j`-th axis.
1329
1331
* n ints: same as an n-tuple/n-list of the same ints (this form is
1330
1332
intended simply as a “convenience” alternative to the tuple form).
1331
1333
0 commit comments