Skip to content

Commit 73526ed

Browse files
authored
chore: update complex dependency (#1568)
1 parent f0b3f10 commit 73526ed

File tree

3 files changed

+7
-8
lines changed

3 files changed

+7
-8
lines changed

nx/mix.exs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ defmodule Nx.MixProject do
3535

3636
defp deps do
3737
[
38-
{:complex, "~> 0.5"},
38+
{:complex, "~> 0.6"},
3939
{:telemetry, "~> 0.4.0 or ~> 1.0"},
4040
{:ex_doc, "~> 0.29", only: :docs}
4141
]

nx/mix.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
%{
2-
"complex": {:hex, :complex, "0.5.0", "af2d2331ff6170b61bb738695e481b27a66780e18763e066ee2cd863d0b1dd92", [:mix], [], "hexpm", "2683bd3c184466cfb94fad74cbfddfaa94b860e27ad4ca1bffe3bff169d91ef1"},
2+
"complex": {:hex, :complex, "0.6.0", "b0130086a7a8c33574d293b2e0e250f4685580418eac52a5658a4bd148f3ccf1", [:mix], [], "hexpm", "0a5fa95580dcaf30fcd60fe1aaf24327c0fe401e98c24d892e172e79498269f9"},
33
"earmark_parser": {:hex, :earmark_parser, "1.4.41", "ab34711c9dc6212dda44fcd20ecb87ac3f3fce6f0ca2f28d4a00e4154f8cd599", [:mix], [], "hexpm", "a81a04c7e34b6617c2792e291b5a2e57ab316365c2644ddc553bb9ed863ebefa"},
44
"ex_doc": {:hex, :ex_doc, "0.34.2", "13eedf3844ccdce25cfd837b99bea9ad92c4e511233199440488d217c92571e8", [:mix], [{:earmark_parser, "~> 1.4.39", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_c, ">= 0.1.0", [hex: :makeup_c, repo: "hexpm", optional: true]}, {:makeup_elixir, "~> 0.14 or ~> 1.0", [hex: :makeup_elixir, repo: "hexpm", optional: false]}, {:makeup_erlang, "~> 0.1 or ~> 1.0", [hex: :makeup_erlang, repo: "hexpm", optional: false]}, {:makeup_html, ">= 0.1.0", [hex: :makeup_html, repo: "hexpm", optional: true]}], "hexpm", "5ce5f16b41208a50106afed3de6a2ed34f4acfd65715b82a0b84b49d995f95c1"},
55
"makeup": {:hex, :makeup, "1.1.2", "9ba8837913bdf757787e71c1581c21f9d2455f4dd04cfca785c70bbfff1a76a3", [:mix], [{:nimble_parsec, "~> 1.2.2 or ~> 1.3", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "cce1566b81fbcbd21eca8ffe808f33b221f9eee2cbc7a1706fc3da9ff18e6cac"},

nx/test/nx/non_finite_test.exs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,18 @@ defmodule Nx.NonFiniteTest do
1111
@arg Complex.new(:infinity, 3)
1212
@arg2 Complex.new(-2, 4)
1313

14-
@inf_inf Complex.new(:infinity, :infinity)
1514
@nan_nan Complex.new(:nan, :nan)
1615

1716
@one Nx.tensor(1, type: {:u, 8})
1817
@zero Nx.tensor(0, type: {:u, 8})
1918

2019
describe "unary operations" do
2120
test "exp" do
22-
assert Nx.exp(@arg) == Nx.tensor(@inf_inf)
21+
assert Nx.exp(@arg) == Nx.tensor(Complex.new(:neg_infinity, :infinity))
2322
end
2423

2524
test "expm1" do
26-
assert Nx.expm1(@arg) == Nx.tensor(@inf_inf)
25+
assert Nx.expm1(@arg) == Nx.tensor(Complex.new(:neg_infinity, :infinity))
2726
end
2827

2928
test "log" do
@@ -51,11 +50,11 @@ defmodule Nx.NonFiniteTest do
5150
end
5251

5352
test "cosh" do
54-
assert Nx.cosh(@arg) == Nx.tensor(@inf_inf)
53+
assert Nx.cosh(@arg) == Nx.tensor(Complex.new(:neg_infinity, :infinity))
5554
end
5655

5756
test "sinh" do
58-
assert Nx.sinh(@arg) == Nx.tensor(@inf_inf)
57+
assert Nx.sinh(@arg) == Nx.tensor(Complex.new(:neg_infinity, :infinity))
5958
end
6059

6160
test "tanh" do
@@ -145,7 +144,7 @@ defmodule Nx.NonFiniteTest do
145144
end
146145

147146
test "product" do
148-
assert Nx.product(Nx.tensor([@arg, @arg2])) == Nx.multiply(@arg, @arg2)
147+
assert Nx.product(Nx.tensor([@arg, @arg2])) == Nx.tensor(Complex.new(:nan, :nan))
149148
assert Nx.product(Nx.tensor(:infinity)) == Nx.tensor(:infinity)
150149
end
151150

0 commit comments

Comments
 (0)