aboutsummaryrefslogtreecommitdiff
path: root/src/Data/Array/Nested
diff options
context:
space:
mode:
authorMikolaj Konarski <mikolaj.konarski@gmail.com>2024-11-19 10:15:55 +0100
committerMikolaj Konarski <mikolaj.konarski@gmail.com>2024-11-19 10:15:55 +0100
commit1b69f540b0c1fa8d45b80f452cab8e7ac02dffd9 (patch)
tree699d775c265158e608d04e8eebfdc5297629f756 /src/Data/Array/Nested
parent6fe603c89c59b156b7ecf410b4f39b28d4a22262 (diff)
Add the criminally absent singletons to numEltMinIndex and numEltMaxIndex
Diffstat (limited to 'src/Data/Array/Nested')
-rw-r--r--src/Data/Array/Nested/Internal/Mixed.hs4
1 files changed, 2 insertions, 2 deletions
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