scipy.sparse.dok_array.

pop#

dok_array.pop(*args)[source]#

Remove specified key and return the corresponding value.

Parameters:
keytuple

The key to remove from the dok_array.

defaultoptional

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.