SimPEG.regularization.WeightedLeastSquares.remove_weights#

WeightedLeastSquares.remove_weights(key)[source]#

Removes specified weights from all child regularization objects.

Parameters:
keystr

The name of the weights being removed from all child regularization objects.

Examples

>>> import discretize
>>> from SimPEG.regularization import WeightedLeastSquares
>>> mesh = discretize.TensorMesh([2, 3, 2])
>>> reg = WeightedLeastSquares(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')