Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add guide on using Complex numbers inside defn #1559

Merged
merged 45 commits into from
Jan 27, 2025
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
df20d2f
Update aggregation.livemd
ndrean Sep 20, 2024
f3aed1e
Update aggregation.livemd
ndrean Sep 20, 2024
6f2bce1
Update aggregation.livemd
ndrean Sep 20, 2024
0102035
Merge branch 'elixir-nx:main' into main
ndrean Nov 13, 2024
afb2463
guide complex fft
ndrean Nov 13, 2024
c405c1a
reviewed j+2
ndrean Nov 15, 2024
2bbb08b
Update nx/guides/advanced/complex_fft.livemd
ndrean Nov 21, 2024
9bc0e93
Update nx/guides/advanced/complex_fft.livemd
ndrean Nov 21, 2024
424a10c
Update nx/guides/advanced/complex_fft.livemd
ndrean Nov 21, 2024
fdb1369
Update nx/guides/advanced/complex_fft.livemd
ndrean Nov 21, 2024
ba65df1
Update nx/guides/advanced/complex_fft.livemd
ndrean Nov 21, 2024
b2e782d
Update nx/guides/advanced/complex_fft.livemd
ndrean Nov 21, 2024
3c32f9b
Update nx/guides/advanced/complex_fft.livemd
ndrean Nov 21, 2024
4c9a74f
Update nx/guides/advanced/complex_fft.livemd
ndrean Nov 21, 2024
3d04213
Update nx/guides/advanced/complex_fft.livemd
ndrean Nov 21, 2024
09c9e04
Update nx/guides/advanced/complex_fft.livemd
ndrean Nov 21, 2024
57c2944
Update nx/guides/advanced/complex_fft.livemd
ndrean Nov 21, 2024
f2b4fb6
Update nx/guides/advanced/complex_fft.livemd
ndrean Nov 21, 2024
54d45ea
Update nx/guides/advanced/complex_fft.livemd
ndrean Nov 21, 2024
b07cffc
Update nx/guides/advanced/complex_fft.livemd
ndrean Nov 21, 2024
ae840f9
Update nx/guides/advanced/complex_fft.livemd
ndrean Nov 21, 2024
d63e50e
Update nx/guides/advanced/complex_fft.livemd
ndrean Nov 21, 2024
a942738
Update nx/guides/advanced/complex_fft.livemd
ndrean Nov 21, 2024
7209b84
Update nx/guides/advanced/complex_fft.livemd
ndrean Nov 21, 2024
1f9f56f
Update nx/guides/advanced/complex_fft.livemd
ndrean Nov 21, 2024
7cfd65e
Update nx/guides/advanced/complex_fft.livemd
ndrean Nov 21, 2024
d1fd218
Update nx/guides/advanced/complex_fft.livemd
ndrean Nov 21, 2024
32eb730
Update nx/guides/advanced/complex_fft.livemd
ndrean Nov 21, 2024
118cf27
Update nx/guides/advanced/complex_fft.livemd
ndrean Nov 21, 2024
8ccb935
Update nx/guides/advanced/complex_fft.livemd
ndrean Nov 21, 2024
ffab161
Update nx/guides/advanced/complex_fft.livemd
ndrean Nov 21, 2024
bd9ba01
Update nx/guides/advanced/complex_fft.livemd
ndrean Nov 21, 2024
09a99b0
Update nx/guides/advanced/complex_fft.livemd
ndrean Nov 21, 2024
5173474
Update nx/guides/advanced/complex_fft.livemd
ndrean Nov 21, 2024
8052b93
Update nx/guides/advanced/complex_fft.livemd
ndrean Nov 21, 2024
a9e684f
Update nx/guides/advanced/complex_fft.livemd
ndrean Nov 21, 2024
072f594
Update nx/guides/advanced/complex_fft.livemd
ndrean Nov 21, 2024
883e653
Update nx/guides/advanced/complex_fft.livemd
ndrean Nov 21, 2024
333e2aa
wip
polvalente Jan 27, 2025
2555935
chore: move FFT portion to NxSignal
polvalente Jan 27, 2025
c9c3e62
chore: remove unused dependencies
polvalente Jan 27, 2025
26223c6
Merge branch 'main' into guide_fft
polvalente Jan 27, 2025
9e54c5f
chore: revert aggregation guide
polvalente Jan 27, 2025
0421f51
Merge branch 'guide_fft' of github.com:ndrean/nx into guide_fft
polvalente Jan 27, 2025
1a704c6
chore: update nx version in guide
polvalente Jan 27, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 19 additions & 18 deletions nx/guides/advanced/aggregation.livemd
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ max_y = Nx.reduce_max(m, axes: [:y])

<!-- livebook:{"output":true} -->

```
```elixir
%{
max: #Nx.Tensor<
s64
Expand Down Expand Up @@ -83,7 +83,7 @@ m = ~MAT[

<!-- livebook:{"output":true} -->

```
```elixir
#Nx.Tensor<
s64[2][2]
[
Expand Down Expand Up @@ -114,7 +114,7 @@ man_w_avg = (1 * 10 + 2 * 20 + 3 * 30 + 4 * 40) / (10 + 20 + 30 + 40)

<!-- livebook:{"output":true} -->

```
```elixir
%{nx_weighted_avg: 3.0, manual_weighted_avg: 3.0}
```

Expand All @@ -138,7 +138,7 @@ man_w_avg_x = [(1 * 10 + 3 * 30) / (10 + 30), (2 * 20 + 4 * 40) / (20 + 40)]

<!-- livebook:{"output":true} -->

```
```elixir
{#Nx.Tensor<
f32[2]
[2.5, 3.3333332538604736]
Expand All @@ -165,7 +165,7 @@ man_w_avg_y = [(1 * 10 + 2 * 20) / (10 + 20), (3 * 30 + 4 * 40) / (30 + 40)]

<!-- livebook:{"output":true} -->

```
```elixir
{#Nx.Tensor<
f32[2]
[1.6666666269302368, 3.5714285373687744]
Expand Down Expand Up @@ -217,7 +217,7 @@ t =

<!-- livebook:{"output":true} -->

```
```elixir
#Nx.Tensor<
s64[x: 2][y: 3][z: 2][t: 3]
[
Expand Down Expand Up @@ -258,7 +258,7 @@ The picture below will help to understand the aggregations.

<!-- livebook:{"break_markdown":true} -->

$$
```math
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't rendering properly inside livebook anymore unfortunately. Please undo the ```math changes

\begin{bmatrix}
x=0 &
\begin{bmatrix}
Expand Down Expand Up @@ -327,7 +327,7 @@ z=1 & a_{1,2,1,0} & a_{1,2,1,1} & a_{1,2,1,2} \\
\end{bmatrix}
\end{bmatrix}
\end{bmatrix}
$$
```

<!-- livebook:{"break_markdown":true} -->

Expand Down Expand Up @@ -361,7 +361,7 @@ Firstly, let's check some characteristics of this tensor using full-tensor aggre

<!-- livebook:{"output":true} -->

```
```elixir
%{
n: 36,
shape: {2, 3, 2, 3},
Expand Down Expand Up @@ -422,7 +422,7 @@ The aggregating function used below is [argmin](https://hexdocs.pm/nx/Nx.html#ar

<!-- livebook:{"break_markdown":true} -->

$$
```math
\begin{bmatrix}
\begin{bmatrix}
\begin{bmatrix}
Expand Down Expand Up @@ -483,15 +483,16 @@ $$
& 0, 0,1 &
\end{bmatrix}
\end{bmatrix}
$$
```


```elixir
Nx.argmin(t, axis: :x)
```

<!-- livebook:{"output":true} -->

```
```elixir
#Nx.Tensor<
s64[y: 3][z: 2][t: 3]
[
Expand Down Expand Up @@ -529,7 +530,7 @@ In the example below, we used again the `argmin` function.

<!-- livebook:{"break_markdown":true} -->

$$
```math
\begin{bmatrix}
\begin{bmatrix}
\begin{bmatrix}
Expand Down Expand Up @@ -582,15 +583,15 @@ $$
& 2,0,0 &
\end{bmatrix}
\end{bmatrix}
$$
```

```elixir
Nx.argmin(t, axis: 1)
```

<!-- livebook:{"output":true} -->

```
```elixir
#Nx.Tensor<
s64[x: 2][z: 2][t: 3]
[
Expand Down Expand Up @@ -618,7 +619,7 @@ In the example below, we used the `argmax` function.

<!-- livebook:{"break_markdown":true} -->

$$
```math
\begin{bmatrix}
x=0 &
\begin{bmatrix}
Expand Down Expand Up @@ -685,7 +686,7 @@ x=1 &
0, 1, 0
\end{bmatrix}
\end{bmatrix}
$$
```

<!-- livebook:{"break_markdown":true} -->

Expand All @@ -697,7 +698,7 @@ Nx.argmax(t, axis: :z)

<!-- livebook:{"output":true} -->

```
```elixir
#Nx.Tensor<
s64[x: 2][y: 3][t: 3]
[
Expand Down
Loading
Loading