simpeg.regularization.BaseAmplitude.remove_weights#
- BaseAmplitude.remove_weights(key)[source]#
Removes the weights for the key provided.
- Parameters:
- key
str
The key for the weights being removed from the cell weights dictionary.
- key
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')