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

# update

dok_matrix.update(val)

  Update values from a dict, sparse dok or iterable of 2-tuples like `.items()`.

  Parameters:
    val dict, dok_array, iterable of 2-tuples

      The values to update in the dok_array. If a dict or dok_array is provided, the keys and values will be taken from it. If an iterable of 2-tuples is provided, each tuple should contain a key and a value. Keys of the input must be sequences of nonnegative integers less than the shape for each axis.