packages feed

static-tensor-0.1.0.0: tests/CoreDump/Tensor/SubtensorSet.hs

{-# LANGUAGE TypeApplications      #-}
{-# LANGUAGE TypeInType            #-}

module CoreDump.Tensor.SubtensorSet where

import Control.Lens
import Data.Tensor.Static
import TensorInstances ()

subtensorSet_ :: Subtensor '[1, 2] '[2, 3, 4] Float -> Tensor '[2, 3, 4] Float -> Tensor '[2, 3, 4] Float
subtensorSet_ st = set (subtensor @'[1, 2] @'[2, 3, 4]) st      -- Had to provide 'st' arg here because 'set' is inlined only with 2 or more args.