1414 </ script >
1515
1616 < meta name ="viewport " content ="width=device-width, initial-scale=1.0 " />
17- < title > dpnp.dpnp_array — Data Parallel Extension for NumPy 0.17.0dev6+29.g62ae40bcc36 documentation</ title >
17+ < title > dpnp.dpnp_array — Data Parallel Extension for NumPy 0.18.0dev0+31.g2c6c6973651 documentation</ title >
1818 < link rel ="stylesheet " type ="text/css " href ="../../_static/pygments.css?v=03e43079 " />
1919 < link rel ="stylesheet " type ="text/css " href ="../../_static/css/theme.css?v=e59714d7 " />
2020
2121
2222 < script src ="../../_static/jquery.js?v=5d32c60e "> </ script >
2323 < script src ="../../_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c "> </ script >
24- < script src ="../../_static/documentation_options.js?v=a964444e "> </ script >
24+ < script src ="../../_static/documentation_options.js?v=5356ff8b "> </ script >
2525 < script src ="../../_static/doctools.js?v=9bcbadda "> </ script >
2626 < script src ="../../_static/sphinx_highlight.js?v=dc90522c "> </ script >
2727 < script src ="../../_static/js/theme.js "> </ script >
@@ -899,47 +899,51 @@ <h1>Source code for dpnp.dpnp_array</h1><div class="highlight"><pre>
899899
900900< span class ="sd "> Parameters</ span >
901901< span class ="sd "> ----------</ span >
902- < span class ="sd "> x1 : {dpnp.ndarray, usm_ndarray}</ span >
903- < span class ="sd "> Array data type casting.</ span >
904902< span class ="sd "> dtype : {None, str, dtype object}</ span >
905903< span class ="sd "> Target data type.</ span >
906- < span class ="sd "> order : {"C", "F", "A", "K"}, optional</ span >
904+ < span class ="sd "> order : {None, "C", "F", "A", "K"}, optional</ span >
907905< span class ="sd "> Row-major (C-style) or column-major (Fortran-style) order.</ span >
908- < span class ="sd "> When ``order`` is 'A', it uses 'F' if ``a`` is column-major and uses 'C' otherwise.</ span >
909- < span class ="sd "> And when ``order`` is 'K', it keeps strides as closely as possible.</ span >
910- < span class ="sd "> copy : bool</ span >
911- < span class ="sd "> If it is False and no cast happens, then this method returns the array itself.</ span >
912- < span class ="sd "> Otherwise, a copy is returned.</ span >
913- < span class ="sd "> casting : {'no', 'equiv', 'safe', 'same_kind', 'unsafe'}, optional</ span >
914- < span class ="sd "> Controls what kind of data casting may occur.</ span >
915- < span class ="sd "> Defaults to ``'unsafe'`` for backwards compatibility.</ span >
916-
917- < span class ="sd "> - 'no' means the data types should not be cast at all.</ span >
918- < span class ="sd "> - 'equiv' means only byte-order changes are allowed.</ span >
919- < span class ="sd "> - 'safe' means only casts which can preserve values are allowed.</ span >
920- < span class ="sd "> - 'same_kind' means only safe casts or casts within a kind, like</ span >
921- < span class ="sd "> float64 to float32, are allowed.</ span >
922- < span class ="sd "> - 'unsafe' means any data conversions may be done.</ span >
923-
924- < span class ="sd "> copy : {bool}, optional</ span >
925- < span class ="sd "> By default, ``astype`` always returns a newly allocated array. If</ span >
926- < span class ="sd "> this is set to ``False``, and the `dtype`, `order`, and `subok`</ span >
927- < span class ="sd "> requirements are satisfied, the input array is returned instead of</ span >
928- < span class ="sd "> a copy.</ span >
929- < span class ="sd "> device : {None, string, SyclDevice, SyclQueue}, optional</ span >
906+ < span class ="sd "> When `order` is ``"A"``, it uses ``"F"`` if `a` is column-major and</ span >
907+ < span class ="sd "> uses ``"C"`` otherwise. And when `order` is ``"K"``, it keeps</ span >
908+ < span class ="sd "> strides as closely as possible.</ span >
909+
910+ < span class ="sd "> Default: ``"K"``.</ span >
911+ < span class ="sd "> casting : {"no", "equiv", "safe", "same_kind", "unsafe"}, optional</ span >
912+ < span class ="sd "> Controls what kind of data casting may occur. Defaults to</ span >
913+ < span class ="sd "> ``"unsafe"`` for backwards compatibility.</ span >
914+
915+ < span class ="sd "> - "no" means the data types should not be cast at all.</ span >
916+ < span class ="sd "> - "equiv" means only byte-order changes are allowed.</ span >
917+ < span class ="sd "> - "safe" means only casts which can preserve values are allowed.</ span >
918+ < span class ="sd "> - "same_kind" means only safe casts or casts within a kind,</ span >
919+ < span class ="sd "> like float64 to float32, are allowed.</ span >
920+ < span class ="sd "> - "unsafe" means any data conversions may be done.</ span >
921+
922+ < span class ="sd "> Default: ``"unsafe"``.</ span >
923+ < span class ="sd "> copy : bool, optional</ span >
924+ < span class ="sd "> Specifies whether to copy an array when the specified dtype matches</ span >
925+ < span class ="sd "> the data type of that array. If ``True``, a newly allocated array</ span >
926+ < span class ="sd "> must always be returned. If ``False`` and the specified dtype</ span >
927+ < span class ="sd "> matches the data type of that array, the self array must be returned;</ span >
928+ < span class ="sd "> otherwise, a newly allocated array must be returned.</ span >
929+
930+ < span class ="sd "> Default: ``True``.</ span >
931+ < span class ="sd "> device : {None, string, SyclDevice, SyclQueue, Device}, optional</ span >
930932< span class ="sd "> An array API concept of device where the output array is created.</ span >
931- < span class ="sd "> The `device` can be ``None`` (the default), an OneAPI filter selector</ span >
932- < span class ="sd "> string, an instance of :class:`dpctl.SyclDevice` corresponding to</ span >
933- < span class ="sd "> a non-partitioned SYCL device, an instance of :class:`dpctl.SyclQueue`,</ span >
934- < span class ="sd "> or a `Device` object returned by</ span >
935- < span class ="sd "> :obj:`dpnp.dpnp_array.dpnp_array.device` property. Default: ``None``.</ span >
933+ < span class ="sd "> `device` can be ``None``, a oneAPI filter selector string,</ span >
934+ < span class ="sd "> an instance of :class:`dpctl.SyclDevice` corresponding to</ span >
935+ < span class ="sd "> a non-partitioned SYCL device, an instance of</ span >
936+ < span class ="sd "> :class:`dpctl.SyclQueue`, or a :class:`dpctl.tensor.Device` object</ span >
937+ < span class ="sd "> returned by :attr:`dpnp.ndarray.device`.</ span >
938+ < span class ="sd "> If the value is ``None``, returned array is created on the same</ span >
939+ < span class ="sd "> device as that array.</ span >
940+
941+ < span class ="sd "> Default: ``None``.</ span >
936942
937943< span class ="sd "> Returns</ span >
938944< span class ="sd "> -------</ span >
939- < span class ="sd "> arr_t : dpnp.ndarray</ span >
940- < span class ="sd "> Unless `copy` is ``False`` and the other conditions for returning the input array</ span >
941- < span class ="sd "> are satisfied, `arr_t` is a new array of the same shape as the input array,</ span >
942- < span class ="sd "> with dtype, order given by dtype, order.</ span >
945+ < span class ="sd "> out : dpnp.ndarray</ span >
946+ < span class ="sd "> An array having the specified data type.</ span >
943947
944948< span class ="sd "> Limitations</ span >
945949< span class ="sd "> -----------</ span >
@@ -949,9 +953,9 @@ <h1>Source code for dpnp.dpnp_array</h1><div class="highlight"><pre>
949953< span class ="sd "> Examples</ span >
950954< span class ="sd "> --------</ span >
951955< span class ="sd "> >>> import dpnp as np</ span >
952- < span class ="sd "> >>> x = np.array([1, 2, 2.5])</ span >
953- < span class ="sd "> >>> x</ span >
956+ < span class ="sd "> >>> x = np.array([1, 2, 2.5]); x</ span >
954957< span class ="sd "> array([1. , 2. , 2.5])</ span >
958+
955959< span class ="sd "> >>> x.astype(int)</ span >
956960< span class ="sd "> array([1, 2, 2])</ span >
957961
@@ -1053,13 +1057,14 @@ <h1>Source code for dpnp.dpnp_array</h1><div class="highlight"><pre>
10531057< span class ="sd "> order : {"C", "F", "A", "K"}, optional</ span >
10541058< span class ="sd "> Memory layout of the newly output array.</ span >
10551059< span class ="sd "> Default: ``"C"``.</ span >
1056- < span class ="sd "> device : {None, string, SyclDevice, SyclQueue}, optional</ span >
1060+ < span class ="sd "> device : {None, string, SyclDevice, SyclQueue, Device }, optional</ span >
10571061< span class ="sd "> An array API concept of device where the output array is created.</ span >
1058- < span class ="sd "> The `device` can be ``None`` (the default), an OneAPI filter</ span >
1059- < span class ="sd "> selector string, an instance of :class:`dpctl.SyclDevice`</ span >
1060- < span class ="sd "> corresponding to a non-partitioned SYCL device, an instance of</ span >
1061- < span class ="sd "> :class:`dpctl.SyclQueue`, or a `Device` object returned by</ span >
1062- < span class ="sd "> :obj:`dpnp.dpnp_array.dpnp_array.device` property.</ span >
1062+ < span class ="sd "> `device` can be ``None``, a oneAPI filter selector string,</ span >
1063+ < span class ="sd "> an instance of :class:`dpctl.SyclDevice` corresponding to</ span >
1064+ < span class ="sd "> a non-partitioned SYCL device, an instance of</ span >
1065+ < span class ="sd "> :class:`dpctl.SyclQueue`, or a :class:`dpctl.tensor.Device` object</ span >
1066+ < span class ="sd "> returned by :attr:`dpnp.ndarray.device`.</ span >
1067+
10631068< span class ="sd "> Default: ``None``.</ span >
10641069< span class ="sd "> usm_type : {None, "device", "shared", "host"}, optional</ span >
10651070< span class ="sd "> The type of SYCL USM allocation for the output array.</ span >
@@ -2027,12 +2032,13 @@ <h1>Source code for dpnp.dpnp_array</h1><div class="highlight"><pre>
20272032
20282033< span class ="sd "> Parameters</ span >
20292034< span class ="sd "> ----------</ span >
2030- < span class ="sd "> device : {string, SyclDevice, SyclQueue}</ span >
2031- < span class ="sd "> Array API concept of target device. It can be an OneAPI filter</ span >
2032- < span class ="sd "> selector string, an instance of :class:`dpctl.SyclDevice`</ span >
2033- < span class ="sd "> corresponding to a non-partitioned SYCL device, an instance of</ span >
2035+ < span class ="sd "> device : {None, string, SyclDevice, SyclQueue, Device}, optional</ span >
2036+ < span class ="sd "> An array API concept of device where the output array is created.</ span >
2037+ < span class ="sd "> `device` can be ``None``, a oneAPI filter selector string,</ span >
2038+ < span class ="sd "> an instance of :class:`dpctl.SyclDevice` corresponding to</ span >
2039+ < span class ="sd "> a non-partitioned SYCL device, an instance of</ span >
20342040< span class ="sd "> :class:`dpctl.SyclQueue`, or a :class:`dpctl.tensor.Device` object</ span >
2035- < span class ="sd "> returned by :obj :`dpnp.dpnp_array.dpnp_array. device` property .</ span >
2041+ < span class ="sd "> returned by :attr :`dpnp.ndarray. device`.</ span >
20362042< span class ="sd "> stream : {SyclQueue, None}, optional</ span >
20372043< span class ="sd "> Execution queue to synchronize with. If ``None``, synchronization</ span >
20382044< span class ="sd "> is not performed.</ span >
0 commit comments