diff --git a/doc/source/pre/whatsnew/1.4.rst b/doc/source/pre/whatsnew/1.4.rst index 945a4bfb374ae015dd3a2daab4613ba23348240e..167b84301cdf6b0c95106aa8c02bf75bd96682f9 100644 --- a/doc/source/pre/whatsnew/1.4.rst +++ b/doc/source/pre/whatsnew/1.4.rst @@ -341,3 +341,5 @@ Changes in Kwant 1.4.1 - The list of user-visible changes was rearranged to emphasize backwards-incompatible changes by moving them to the top of the list and adding the entry `Value functions may no longer take unnamed arguments`_. +- Kwant no longer requires the existence of a `parameters` attribute for + low-level systems. diff --git a/kwant/_system.pyx b/kwant/_system.pyx index 45e0da438e6b9a7322307331982ea76d8cf272c7..71860ed674dbabfade12a69c9eb2df9f31b6f65e 100644 --- a/kwant/_system.pyx +++ b/kwant/_system.pyx @@ -243,17 +243,6 @@ def make_dense_full(ham, args, params, CGraph gr, diag, return h_sub -def _check_parameters_match(expected_parameters, params): - if params is None: - params = {} - missing = set(expected_parameters) - set(params) - - if missing: - msg = ('System is missing required parameters: ', - ', '.join(map('"{}"'.format, missing))) - raise TypeError(''.join(msg)) - - @deprecate_args @cython.binding(True) @cython.embedsignature(True) @@ -301,9 +290,6 @@ def hamiltonian_submatrix(self, args=(), to_sites=None, from_sites=None, n = self.graph.num_nodes matrix = ta.matrix - if not args: # Then perhaps parameters - _check_parameters_match(self.parameters, params) - if from_sites is None: diag = n * [None] from_norb = np.empty(n, gint_dtype)