def explain
stelliferous@0.0.2.0 · tensor.bend:563
import stelliferous@0.0.2.0/tensor.bend as Tensor
import Base
563def explain(reason: Reason) -> String:
564 match reason:
565 case ShapeMismatch{left,right}:
566 String.append("shapes ",String.append(show_shape(left),String.append(" and ",String.append(show_shape(right)," do not match"))))
567 case InvalidShape{shape}:
568 String.append("shape ",String.append(show_shape(shape)," is invalid or exceeds the machine capacity"))
569 case InvalidArgument{shape}:
570 String.append("invalid argument for shape ",show_shape(shape))
571 case FileFault{path,detail}:
572 String.append("file ",String.append(path,String.append(" ",detail)))
573 case MissingName{name}:
574 String.append("no tensor named ",name)