DefaultValidator class

(Shortest import: from brian2.core.preferences import DefaultValidator)

class brian2.core.preferences.DefaultValidator(value)[source]

Bases: object

Default preference validator

Used by BrianPreference as the default validator if none is given. First checks if the provided value is of the same class as the default value, and then if the default is a Quantity, checks that the units match.

Methods

__call__(…) <==> x(…)

Details

__call__(...) <==> x(...)[source]