Re:Ask HN: Why is Python so popular for ML/DS?
by tedmiston on Tuesday January 23, 2018 @07:13PM
(#16219180)
We have type annotations in python now which can be used to clarify data types in function signatures.
Re:Ask HN: Why is Python so popular for ML/DS?
by brorfred on Tuesday January 23, 2018 @03:37PM
(#16217422)
Wouldn't the default assumption be that you can use either a scalar or vector?
Re:Ask HN: Why is Python so popular for ML/DS?
by happy-go-lucky on Tuesday January 23, 2018 @04:38PM
(#16217971)
You could try np.isscalar() and np.array().ndim in NumPy.
For example, I was trying to understand a batch normalization function defined as
def batchnorm_forward(x, gamma, beta, eps):
I can’t tell if gamma/beta are scalar or vector?