From 16e52d87e9955628a016946c10515c39ce4ef1d0 Mon Sep 17 00:00:00 2001 From: Tom Smeding Date: Mon, 20 May 2024 16:42:25 +0200 Subject: constant -> replicate --- src/Data/Array/Mixed.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Data/Array/Mixed.hs') diff --git a/src/Data/Array/Mixed.hs b/src/Data/Array/Mixed.hs index b07f120..33c0dd6 100644 --- a/src/Data/Array/Mixed.hs +++ b/src/Data/Array/Mixed.hs @@ -466,8 +466,8 @@ cast ssh1 sh2 ssh' (XArray arr) unScalar :: Storable a => XArray '[] a -> a unScalar (XArray a) = S.unScalar a -constant :: forall sh a. Storable a => IShX sh -> a -> XArray sh a -constant sh x +replicate :: forall sh a. Storable a => IShX sh -> a -> XArray sh a +replicate sh x | Dict <- lemKnownNatRank sh = XArray (S.constant (shapeLshape sh) x) -- cgit v1.2.3-70-g09d2