💣 Machine learning which might blow up in your face 💣

Only permit exact hotmaps

+1 -4
-3
grenade.cabal
··· 42 42 , containers >= 0.5 && < 0.6 43 43 , cereal >= 0.5 && < 0.6 44 44 , deepseq >= 1.4 && < 1.5 45 - , exceptions == 0.8.* 46 45 , hmatrix == 0.18.* 47 46 , MonadRandom >= 0.4 && < 0.6 48 - , mtl >= 2.2.1 && < 2.3 49 47 , primitive >= 0.6 && < 0.7 50 - , text == 1.2.* 51 48 , singletons >= 2.1 && < 2.4 52 49 , vector >= 0.11 && < 0.13 53 50
+1 -1
src/Grenade/Utils/OneHot.hs
··· 57 57 let len = fromIntegral $ natVal n 58 58 uniq = [ c | (c:_) <- group $ sort as] 59 59 hotl = length uniq 60 - in if hotl <= len 60 + in if hotl == len 61 61 then 62 62 Just (M.fromList $ zip uniq [0..], V.fromList uniq) 63 63 else Nothing