feat: Partial fromDualRep_tensor
This commit is contained in:
parent
2c26584cfc
commit
5fc5946530
5 changed files with 65 additions and 10 deletions
|
@ -195,8 +195,10 @@ def getNoIndicesExact (stx : Syntax) : TermElabM ℕ := do
|
|||
let a' ← whnf a
|
||||
match a' with
|
||||
| Expr.lit (Literal.natVal n) => return n
|
||||
|_ => throwError "Could not extract number of indices from tensor (getNoIndicesExact). "
|
||||
| _ => throwError "Could not extract number of indices from tensor (getNoIndicesExact). "
|
||||
|_ => throwError s!"Could not extract number of indices from tensor
|
||||
{stx} (getNoIndicesExact). "
|
||||
| _ => throwError s!"Could not extract number of indices from tensor
|
||||
{stx} (getNoIndicesExact). "
|
||||
| _ => return 1
|
||||
| k => return k
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue