From beb43517c3552b72b9c8fc1710f681b0180418ec Mon Sep 17 00:00:00 2001 From: Tianyi Zheng Date: Wed, 16 Aug 2023 04:36:10 -0700 Subject: [PATCH] Fix `mypy` errors in `maths/gaussian_error_linear_unit.py` (#8610) * updating DIRECTORY.md * Fix mypy errors in gaussian_error_linear_unit.py * updating DIRECTORY.md * updating DIRECTORY.md --------- Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com> --- maths/gaussian_error_linear_unit.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/maths/gaussian_error_linear_unit.py b/maths/gaussian_error_linear_unit.py index 18384bb6c..b3cbd7810 100644 --- a/maths/gaussian_error_linear_unit.py +++ b/maths/gaussian_error_linear_unit.py @@ -30,12 +30,10 @@ def gaussian_error_linear_unit(vector: np.ndarray) -> np.ndarray: Implements the Gaussian Error Linear Unit (GELU) function Parameters: - vector (np.array): A numpy array of shape (1,n) - consisting of real values + vector (np.ndarray): A numpy array of shape (1, n) consisting of real values Returns: - gelu_vec (np.array): The input numpy array, after applying - gelu. + gelu_vec (np.ndarray): The input numpy array, after applying gelu Examples: >>> gaussian_error_linear_unit(np.array([-1.0, 1.0, 2.0]))