Skip to main content
`Ctrl`+`K`
scipy.sparse.dok_array.

# todense

dok_array.todense(order=None, out=None)

  Return a dense representation of this sparse array.

  Parameters:
    order{‘C’, ‘F’}, optional

      Whether to store multi-dimensional data in C (row-major) or Fortran (column-major) order in memory. The default is ‘None’, which provides no ordering guarantees. Cannot be specified in conjunction with the out argument.

    out ndarray, 2-D, optional

      If specified, uses this array as the output buffer instead of allocating a new array to return. The provided array must have the same shape and dtype as the sparse array on which you are calling the method.

  Returns:
    arr ndarray, 2-D

      An array with the same shape and containing the same data represented by the sparse array, with the requested memory order. If out was passed, the same object is returned after being modified in-place to contain the appropriate values.