Skip to content

Commit 4fb7dd6

Browse files
vtavanaantonwolfy
andauthored
Apply suggestions from code review
Co-authored-by: Anton <[email protected]>
1 parent ab1112a commit 4fb7dd6

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

dpnp/dpnp_iface_manipulation.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1945,7 +1945,8 @@ def repeat(a, repeats, axis=None):
19451945

19461946
def require(a, dtype=None, requirements=None, *, like=None):
19471947
"""
1948-
Return an dpnp.ndarray of the provided type that satisfies requirements.
1948+
Return a :class:`dpnp.ndarray` of the provided type that satisfies
1949+
requirements.
19491950
19501951
This function is useful to be sure that an array with the correct flags
19511952
is returned for passing to compiled code (perhaps through ctypes).
@@ -1956,11 +1957,9 @@ def require(a, dtype=None, requirements=None, *, like=None):
19561957
----------
19571958
a : array_like
19581959
The object to be converted to a type-and-requirement-satisfying array.
1959-
dtype : data-type, optional
1960-
The required data-type. If None preserve the current dtype. If your
1961-
application requires the data to be in native byteorder, include
1962-
a byteorder specification as a part of the dtype specification.
1963-
requirements : {str, sequence of str}, , optional
1960+
dtype : {None, data-type}, optional
1961+
The required data-type. If ``None`` preserve the current dtype.
1962+
requirements : {None, str, sequence of str}, optional
19641963
The requirements list can be any of the following:
19651964
19661965
* 'F_CONTIGUOUS' ('F') - ensure a Fortran-contiguous array
@@ -1980,7 +1979,7 @@ def require(a, dtype=None, requirements=None, *, like=None):
19801979
See Also
19811980
--------
19821981
:obj:`dpnp.asarray` : Convert input to an ndarray.
1983-
:obj:`dpnp.asanyarray ` : Convert to an ndarray, but pass through
1982+
:obj:`dpnp.asanyarray` : Convert to an ndarray, but pass through
19841983
ndarray subclasses.
19851984
:obj:`dpnp.ascontiguousarray` : Convert input to a contiguous array.
19861985
:obj:`dpnp.asfortranarray` : Convert input to an ndarray with
@@ -1996,7 +1995,7 @@ def require(a, dtype=None, requirements=None, *, like=None):
19961995
Examples
19971996
--------
19981997
>>> import dpnp as np
1999-
>>> x = np.arange(6).reshape(2,3)
1998+
>>> x = np.arange(6).reshape(2, 3)
20001999
>>> x.flags
20012000
C_CONTIGUOUS : True
20022001
F_CONTIGUOUS : False

0 commit comments

Comments
 (0)