simpeg.regularization.BaseSimilarityMeasure.remove_weights#

BaseSimilarityMeasure.remove_weights(key)[source]#

Removes the weights for the key provided.

Parameters:
keystr

The key for the weights being removed from the cell weights dictionary.

Examples

>>> import discretize
>>> from simpeg.regularization import Smallness
>>> mesh = discretize.TensorMesh([2, 3, 2])
>>> reg = Smallness(mesh)
>>> reg.set_weights(my_weight=np.ones(mesh.n_cells))
>>> reg.get_weights('my_weight')
array([1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1., 1.])
>>> reg.remove_weights('my_weight')