scipy.sparse.dok_array.

popitem#

dok_array.popitem()[source]#

Remove and return a (key, value) pair as a 2-tuple, returned in LIFO (last-in, first-out) order.

Returns:
keytuple

The key of the removed item.

valuescalar

The value of the removed item.

Raises:
KeyError

If the dict is empty.