We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2580dfb commit c6b8bc7Copy full SHA for c6b8bc7
dpnp/dpnp_array.py
@@ -2031,11 +2031,11 @@ def tolist(self):
2031
For a 1D array, ``a.tolist()`` is almost the same as ``list(a)``,
2032
except that ``tolist`` changes 0D arrays to Python scalars:
2033
2034
- >>> import numpy as np
+ >>> import dpnp as np
2035
>>> a = np.array([1, 2])
2036
>>> list(a)
2037
[array(1), array(2)]
2038
- >>> a_tolist = a.tolist()
+ >>> a.tolist()
2039
[1, 2]
2040
2041
Additionally, for a 2D array, ``tolist`` applies recursively:
0 commit comments