UnsupportedOperationError#
- class brainevent.UnsupportedOperationError#
Raised when an operation is structurally meaningless for a representation.
This signals a deliberate refusal: the requested method is part of the common
DataRepresentationcontract, but the concrete representation cannot give it a well-defined meaning. It is distinct fromNotImplementedError(which marks an abstract base stub that a subclass is expected to override) – catchingUnsupportedOperationErrorlets callers distinguish “this representation will never support this” from “not written yet”.- Parameters:
message (str) – A human-readable description naming why the operation is unsupported and, where possible, an explicit alternative (for example, materialising a just-in-time-connectivity matrix with
.tocsr()first).
See also
MathErrorRaised for invalid inputs to an otherwise-supported operation.
Notes
A just-in-time-connectivity matrix, for instance, refuses
fromdense()(it cannot recover the generating(prob, seed)) and the per-synapsedt2t/update_on_*protocols (its weight is a distribution parameter, not a per-synapse array).Examples
>>> from brainevent._error import UnsupportedOperationError >>> raise UnsupportedOperationError( ... "JITC connectivity cannot recover (prob, seed) from a dense matrix" ... )