dpnp.tensor.usm_ndarray_repr

dpnp.tensor.usm_ndarray_repr(x, line_width=None, precision=None, suppress=None, prefix='usm_ndarray')[source]

Returns a formatted string representing the elements of a dpnp.tensor.usm_ndarray and its data type, if not a default type.

Parameters:
  • x (usm_ndarray) -- Input array.

  • line_width (int, optional) --

    Number of characters printed per line. Raises TypeError if line_width is not an integer.

    Default: 75.

  • precision (int, optional) --

    Number of digits printed for floating point numbers. Raises TypeError if precision is not an integer.

    Default: 8.

  • suppress (bool, optional) --

    If True, numbers equal to zero in the current precision will print as zero.

    Default: False.

  • prefix (str, optional) --

    String inserted at the start of the array string.

    Default: "usm_ndarray".

Returns:

out -- Formatted string representing the input array.

Return type:

str