Skip to content

Commit

Permalink
visual intro to numpy
Browse files Browse the repository at this point in the history
  • Loading branch information
ariefrahmansyah committed Aug 15, 2024
1 parent 2ec11b0 commit 2bd0466
Show file tree
Hide file tree
Showing 47 changed files with 1,551 additions and 32 deletions.
3 changes: 1 addition & 2 deletions docs/_toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,7 @@ parts:
- caption: NumPy
chapters:
- file: numpy/intro_to_numpy
- file: numpy/numpy_quickstart
- file: numpy/numpy_fundamentals
- file: numpy/visual_intro_to_numpy

- caption: Pandas
chapters:
Expand Down
Binary file added docs/images/numpy/create_numpy_array.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/numpy/create_numpy_array_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/numpy/create_numpy_array_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/numpy/mean_square_error_formula.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/numpy/numpy_3d_array.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/numpy/numpy_3d_array_creation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/numpy/numpy_array.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/numpy/numpy_array_aggregation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/numpy/numpy_array_broadcast.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/numpy/numpy_array_create_2d.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/numpy/numpy_array_slice.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/numpy/numpy_arrays_adding_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/numpy/numpy_arrays_example_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/numpy/numpy_audio.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/numpy/numpy_color_image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/numpy/numpy_grayscale_image.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/numpy/numpy_matrix_aggregation_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/numpy/numpy_matrix_aggregation_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/numpy/numpy_matrix_aggregation_3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/numpy/numpy_matrix_aggregation_4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/numpy/numpy_matrix_arithmetic.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/numpy/numpy_matrix_broadcast.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/numpy/numpy_matrix_dot_product_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/numpy/numpy_matrix_dot_product_2.png
Binary file added docs/images/numpy/numpy_matrix_indexing.png
Binary file added docs/images/numpy/numpy_mse_1.png
Binary file added docs/images/numpy/numpy_mse_2.png
Binary file added docs/images/numpy/numpy_mse_3.png
Binary file added docs/images/numpy/numpy_mse_4.png
Binary file added docs/images/numpy/numpy_nlp_bert_shape.png
Binary file added docs/images/numpy/numpy_nlp_embeddings.png
Binary file added docs/images/numpy/numpy_nlp_ids.png
Binary file added docs/images/numpy/numpy_nlp_tokenization.png
Binary file added docs/images/numpy/numpy_nlp_vocabulary.png
Binary file added docs/images/numpy/numpy_reshape.png
Binary file added docs/images/numpy/numpy_transpose.png
11 changes: 11 additions & 0 deletions docs/images/numpy/rename.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
for file in *; do
# Check if the file name contains a hyphen
if [[ "$file" == *-* ]]; then
# Replace hyphens with underscores in the file name
new_file="${file//-/_}"
# Rename the file
mv "$file" "$new_file"
fi
done

echo "Renaming completed."
Binary file added docs/images/pandas/excel_to_pandas.png
32 changes: 32 additions & 0 deletions docs/numpy/intro_to_numpy.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,35 @@ Berikut beberapa perbedaan antara Numpy array dengan Python list:
2. Numpy array memiliki elemen-elemen yang seragam, sehingga ukuran mereka di dalam memori akan tetap sama.
3. Numpy array mendukung operasi matematika pada array ukuran besar secara efisien, sedangkan Python list tidak.
4. Bertambah banyaknya library scientific computing di Python yang menggunakan NumPy sebagai basisnya.

## NumPy Quickstart

Untuk mulai menggunakan NumPy dan mempelajari konsep dasar NumPy, kamu dapat membaca tutorial dari halaman resmi NumPy:

[NumPy quickstart](https://numpy.org/doc/stable/user/quickstart.html)

Tutorial di atas akan membantu kamu memahami tentang:

1. Perbedaan antara one-, two-, dan n-dimensional arrays di NumPy
2. Bagaimana cara menggunakan operasi-operasi aljabar linear untuk n-dimensional arrays tanpa menggunakan for-loops
3. Memaham properti `axis` dan `shape` dari n-dimensional arrays

---

Selain itu, kamu juga bisa membaca tutorial NumPy di beberapa situs berikut:

1. [Scientific Computing in Python: Introduction to NumPy and Matplotlib](https://sebastianraschka.com/blog/2020/numpy-intro.html)

## NumPy Fundamentals

Dokumen-dokumen dari situs resmi NumPy di bawah ini akan membantu kamu untuk lebih memahami konsep, design decisions, dan technical constrains dari NumPy.

- [Array creation](https://numpy.org/doc/stable/user/basics.creation.html)
- [Indexing on ndarrays](https://numpy.org/doc/stable/user/basics.indexing.html)
- [I/O with NumPy](https://numpy.org/doc/stable/user/basics.io.html)
- [Data types](https://numpy.org/doc/stable/user/basics.types.html)
- [Broadcasting](https://numpy.org/doc/stable/user/basics.broadcasting.html)
- [Copies and views](https://numpy.org/doc/stable/user/basics.copies.html)
- [Working with Arrays of Strings And Bytes](https://numpy.org/doc/stable/user/basics.strings.html)
- [Structured arrays](https://numpy.org/doc/stable/user/basics.rec.html)
- [Universal functions (ufunc) basics](https://numpy.org/doc/stable/user/basics.ufuncs.html)
13 changes: 0 additions & 13 deletions docs/numpy/numpy_fundamentals.md

This file was deleted.

17 changes: 0 additions & 17 deletions docs/numpy/numpy_quickstart.md

This file was deleted.

Loading

0 comments on commit 2bd0466

Please sign in to comment.