def update_lengthscale(self, scale):
    if ((not isinstance(scale, np.ndarray)) or (scale.size == 1)):
        self.length_scale = (scale * np.ones((self.domain_dim,)))
    else:
        assert (scale.size == self.domain_dim)
        self.length_scale = scale
    assert (self.length_scale.size == self.domain_dim)
def update_lengthscale(self, scale):
    if ((not isinstance(scale, np.ndarray)) or (scale.size == 1)):
        self.length_scale = (scale * np.ones((self.domain_dim,)))
    else:
        assert (scale.size == self.domain_dim)
        self.length_scale = scale
    assert (self.length_scale.size == self.domain_dim)