class
Phase::DimensionError
- Phase::DimensionError
- Phase::ShapeError
- Exception
- Reference
- Object
Overview
A DimensionError is raised when the dimensionality of a data type is
incorrect for a given operation. For example, a method that will work on any
matrix should raise a DimensionError when passed a 3D MultiIndexable - the
shape values should not matter, only the dimension.
If you do not care about disambiguating between ShapeError and DimensionError,
note that DimensionError is a subclass of ShapeError - so you only need
to rescue ex : ShapeError and you'll catch both kinds.