def error_code

bendtorch-core@0.1.0.0 · src/shape/core.bend:914

import bendtorch-core@0.1.0.0/src/shape/core.bend as Core
import Base

914def error_code(error: Error) -> U32:
915  match error:
916    case RankExceeded{}:
917      1
918    case CapacityExceeded{}:
919      2
920    case CoordinateRankMismatch{}:
921      3
922    case CoordinateOutOfBounds{}:
923      4
924    case FlatIndexOutOfBounds{}:
925      5
926    case IncompatibleBroadcast{}:
927      6

Uses (2)

Used by (3)