From ef562590d1105a87653480efc1c5b831e8f14387 Mon Sep 17 00:00:00 2001 From: HombreLaser Date: Fri, 20 Oct 2023 15:17:53 -0600 Subject: Fix neural network --- utils.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'utils.py') diff --git a/utils.py b/utils.py index d068023..a4f6cd3 100644 --- a/utils.py +++ b/utils.py @@ -1,6 +1,4 @@ -import numpy -from random import random +import numpy as np -def random_array(rows: int, columns: int): - random_matrix = [[random() for x in range(rows)] for y in range(columns)] - return numpy.asarray(random_matrix) +def random_array(length: int): + return np.random.rand(length, 1) -- cgit v1.2.3