mirror of
https://github.com/TheAlgorithms/Python.git
synced 2024-11-23 21:11:08 +00:00
Style sigmoid function in harmony with pep guideness (#6677)
* Style sigmoid function in harmony with pep guideness * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * Apply suggestions from code review --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Tianyi Zheng <tianyizheng02@gmail.com>
This commit is contained in:
parent
421ace81ed
commit
5a4ea233cd
|
@ -21,8 +21,8 @@ import numpy as np
|
|||
from matplotlib import pyplot as plt
|
||||
|
||||
|
||||
def sigmoid(x):
|
||||
return 1 / (1 + np.exp(-1 * x))
|
||||
def sigmoid(x: np.ndarray) -> np.ndarray:
|
||||
return 1 / (1 + np.exp(-x))
|
||||
|
||||
|
||||
class DenseLayer:
|
||||
|
|
Loading…
Reference in New Issue
Block a user