mirror of
https://github.com/ml-explore/mlx.git
synced 2025-09-18 18:28:12 +08:00
Added ArcTan2 operation (#1079)
* Added ArcTan2 operation * Cleanup, bug fixes from code review * Minor cleanup, fixed Linux tests
This commit is contained in:
@@ -930,6 +930,25 @@ void init_ops(nb::module_& m) {
|
||||
Returns:
|
||||
array: The inverse tangent of ``a``.
|
||||
)pbdoc");
|
||||
m.def(
|
||||
"arctan2",
|
||||
&mlx::core::arctan2,
|
||||
nb::arg(),
|
||||
nb::arg(),
|
||||
nb::kw_only(),
|
||||
"stream"_a = nb::none(),
|
||||
nb::sig(
|
||||
"def arctan2(a: array, b: array, /, *, stream: Union[None, Stream, Device] = None) -> array"),
|
||||
R"pbdoc(
|
||||
Element-wise inverse tangent of the ratio of two arrays.
|
||||
|
||||
Args:
|
||||
a (array): Input array.
|
||||
b (array): Input array.
|
||||
|
||||
Returns:
|
||||
array: The inverse tangent of the ratio of ``a`` and ``b``.
|
||||
)pbdoc");
|
||||
m.def(
|
||||
"sinh",
|
||||
&mlx::core::sinh,
|
||||
|
Reference in New Issue
Block a user