cupyx.scipy.sparse.get_index_dtype#

cupyx.scipy.sparse.get_index_dtype(arrays=(), maxval=None, check_contents=False)[source]#

Based on input (integer) arrays a, determines a suitable index data type that can hold the data in the arrays.

Parameters:
  • arrays (tuple of array_like) – Input arrays whose types/contents to check

  • maxval (float, optional) – Maximum value needed

  • check_contents (bool, optional) – Whether to check the values in the arrays and not just their types. Default: False (check only the types)

Returns:

Suitable index data type (int32 or int64)

Return type:

dtype