File tree 2 files changed +2
-4
lines changed
2 files changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -781,7 +781,7 @@ egisonDef =
781
781
782
782
symbol0 = oneOf " ^"
783
783
symbol1 = oneOf " +-*/.=∂∇"
784
- symbol2 = symbol1 <|> oneOf " '!?"
784
+ symbol2 = symbol1 <|> oneOf " '!?₀₁₂₃₄₅₆₇₈₉ "
785
785
786
786
lexer :: P. GenTokenParser String () Identity
787
787
lexer = P. makeTokenParser egisonDef
Original file line number Diff line number Diff line change @@ -805,9 +805,7 @@ tIndex (Tensor _ _ js) = js
805
805
tIndex (Scalar _) = []
806
806
807
807
tIntRef' :: HasTensor a => Integer -> Tensor a -> EgisonM a
808
- tIntRef' i (Tensor [ary] xs _) = let n = fromIntegral (length [ary]) in
809
- if (0 < i) && (i <= (n + 3 )) then fromTensor $ Scalar $ xs V. ! fromIntegral (i - 1 )
810
- else throwError $ TensorIndexOutOfBounds i (n + 3 )
808
+ tIntRef' i (Tensor [_] xs _) = fromTensor $ Scalar $ xs V. ! (fromIntegral (i - 1 ))
811
809
tIntRef' i (Tensor (n: ns) xs js) =
812
810
if (0 < i) && (i <= n)
813
811
then let w = fromIntegral (product ns) in
You can’t perform that action at this time.
0 commit comments