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

# pop

dok_matrix.pop(key, default=<object object>, /)

  Remove specified key and return the corresponding value.

  Parameters:
    key tuple

      The key to remove from the dok_array.

    default optional

      The value to return if key is not found. If not provided and key is not found, a KeyError is raised.

  Returns:
    scalar

      The value associated with the removed key.

  Raises:
    KeyError

      If the key is not found and default is not provided.