From 1b69f540b0c1fa8d45b80f452cab8e7ac02dffd9 Mon Sep 17 00:00:00 2001 From: Mikolaj Konarski Date: Tue, 19 Nov 2024 10:15:55 +0100 Subject: Add the criminally absent singletons to numEltMinIndex and numEltMaxIndex --- src/Data/Array/Nested/Internal/Mixed.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Data/Array/Nested/Internal/Mixed.hs') diff --git a/src/Data/Array/Nested/Internal/Mixed.hs b/src/Data/Array/Nested/Internal/Mixed.hs index 023f6fa..0e4f5e6 100644 --- a/src/Data/Array/Nested/Internal/Mixed.hs +++ b/src/Data/Array/Nested/Internal/Mixed.hs @@ -849,12 +849,12 @@ miota sn = fromPrimitive $ M_Primitive (SKnown sn :$% ZSX) (X.iota sn) -- | Throws if the array is empty. mminIndexPrim :: (PrimElt a, NumElt a) => Mixed sh a -> IIxX sh mminIndexPrim (toPrimitive -> M_Primitive sh (XArray arr)) = - ixxFromList (ssxFromShape sh) (numEltMinIndex arr) + ixxFromList (ssxFromShape sh) (numEltMinIndex (shxRank sh) arr) -- | Throws if the array is empty. mmaxIndexPrim :: (PrimElt a, NumElt a) => Mixed sh a -> IIxX sh mmaxIndexPrim (toPrimitive -> M_Primitive sh (XArray arr)) = - ixxFromList (ssxFromShape sh) (numEltMaxIndex arr) + ixxFromList (ssxFromShape sh) (numEltMaxIndex (shxRank sh) arr) mdot1Inner :: forall sh n a. (PrimElt a, NumElt a) => Proxy n -> Mixed (sh ++ '[n]) a -> Mixed (sh ++ '[n]) a -> Mixed sh a -- cgit v1.2.3-70-g09d2