Skip to content

Commit

Permalink
Merge pull request #12 from mimiquate/abs
Browse files Browse the repository at this point in the history
feat: Nx.abs/1 supports s64
  • Loading branch information
grzuy authored Oct 30, 2023
2 parents f3b7b0e + 95a1ebb commit bad6031
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions native/candlex/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions test/candlex_test.exs
Original file line number Diff line number Diff line change
Expand Up @@ -740,6 +740,10 @@ defmodule CandlexTest do
t([-2.0, -1, 0, 1, 2])
|> Nx.abs()
|> assert_equal(t([2, 1, 0, 1, 2]))

t([-2, -1, 0, 1, 2])
|> Nx.abs()
|> assert_equal(t([2, 1, 0, 1, 2]))
end

test "sqrt" do
Expand Down

0 comments on commit bad6031

Please sign in to comment.