Fix numpy deprecation warning in 2_hidden_layers_neural_network.py (#10424)
* updating DIRECTORY.md
* updating DIRECTORY.md
* updating DIRECTORY.md
* updating DIRECTORY.md
* Fix deprecation warning in 2_hidden_layers_neural_network.py
Fix numpy deprecation warning:
DeprecationWarning: Conversion of an array with ndim > 0 to a scalar is deprecated, and will error in future. Ensure you extract a single element from your array before performing this operation. (Deprecated NumPy 1.25.)
---------
Co-authored-by: github-actions <${GITHUB_ACTOR}@users.noreply.github.com>
This commit is contained in:
@@ -221,7 +221,7 @@ class TwoHiddenLayerNeuralNetwork:
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
return int(self.layer_between_second_hidden_layer_and_output > 0.6)
|
return int((self.layer_between_second_hidden_layer_and_output > 0.6)[0])
|
||||||
|
|
||||||
|
|
||||||
def sigmoid(value: numpy.ndarray) -> numpy.ndarray:
|
def sigmoid(value: numpy.ndarray) -> numpy.ndarray:
|
||||||
|
|||||||
Reference in New Issue
Block a user