DimensionMismatchError class¶
(Shortest import: from brian2 import DimensionMismatchError)
- class brian2.units.fundamentalunits.DimensionMismatchError(description, *dims)[source]¶
Bases:
ExceptionException class for attempted operations with inconsistent dimensions.
For example,
3*mvolt + 2*ampraises this exception. The purpose of this class is to help catch errors based on incorrect units. The exception will print a representation of the dimensions of the two inconsistent objects that were operated on.