Skip to content

Commit

Permalink
Simpler type check for Basis
Browse files Browse the repository at this point in the history
  • Loading branch information
thangleiter committed May 7, 2020
1 parent c7a2b5d commit 2cee556
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion filter_functions/pulse_sequence.py
Original file line number Diff line number Diff line change
Expand Up @@ -873,7 +873,7 @@ def _parse_args(H_c: Hamiltonian, H_n: Hamiltonian, dt: Coefficients,
# expression for a basis expansion
basis = Basis.ggm(d)
else:
if not all(hasattr(basis, attr) for attr in ('_atol', '_rtol')):
if not hasattr(basis, 'btype'):
raise ValueError("Expected basis to be an instance of the " +
"'filter_functions.basis.Basis' class, not " +
"{}!".format(type(basis)))
Expand Down

0 comments on commit 2cee556

Please sign in to comment.