MCPcopy Create free account
hub / github.com/ml-explore/mlx / cosh

Function cosh

mlx/ops.cpp:3054–3058  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3052}
3053
3054array cosh(const array& a, StreamOrDevice s /* = {} */) {
3055 auto dtype = at_least_float(a.dtype());
3056 auto input = astype(a, dtype, s);
3057 return array(a.shape(), dtype, std::make_shared<Cosh>(to_stream(s)), {input});
3058}
3059
3060array tanh(const array& a, StreamOrDevice s /* = {} */) {
3061 auto dtype = at_least_float(a.dtype());

Callers 7

init_opsFunction · 0.85
vmapMethod · 0.85
jvpMethod · 0.85
operator()Method · 0.85
operator()Method · 0.85
operator()Method · 0.85
operator()Method · 0.85

Calls 4

astypeFunction · 0.85
to_streamFunction · 0.85
at_least_floatFunction · 0.70
arrayFunction · 0.70

Tested by

no test coverage detected