• full name:

  • parent module:

  • type: function, keys, verbose_msg=None)[source]

Check for any non-zero or non-equal entries in some parameters.

Deprecated since version 0.8.0: This method will be removed in version 1.0.0. Use tenpy.toosl.params.Config.any_nonzero() instead.

  • params (dict | Config) – A dictionary of parameters, or a Config instance.

  • keys (list of {key | tuple of keys}) – For a single key, check params[key] for non-zero entries. For a tuple of keys, all the params[key] have to be equal (as numpy arrays).

  • verbose_msg (None | str) – If params[‘verbose’] >= 1, we print verbose_msg before checking, and a short notice with the key, if a non-zero entry is found.


match – False, if all params[key] are zero or None and True, if any of the params[key] for single key in keys, or if any of the entries for a tuple of keys

Return type