From a7029c906dfc1eac6d4bc8cb19e5ba0e33584b48 Mon Sep 17 00:00:00 2001 From: sofiiako <19rubisco93@gmail.com> Date: Mon, 20 Dec 2021 16:18:44 +0300 Subject: [PATCH] replaced fake hints #2 --- NumPy/Array Basics/Create an Empty Array/task.md | 4 ++-- NumPy/Array Indexing and Slicing/Indexing Basics/task.md | 4 ++-- NumPy/Array Math/Linear Algebra/task.md | 4 ++-- NumPy/Transposing Sorting Concatenating/Sort/task.md | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/NumPy/Array Basics/Create an Empty Array/task.md b/NumPy/Array Basics/Create an Empty Array/task.md index cfe4585..85f0998 100644 --- a/NumPy/Array Basics/Create an Empty Array/task.md +++ b/NumPy/Array Basics/Create an Empty Array/task.md @@ -8,11 +8,11 @@ NumPy offers several functions to create arrays with initial placeholder content - the function [`empty`](https://numpy.org/doc/stable/reference/generated/numpy.empty.html#numpy.empty) creates an array where the initial content is random and depends on the state of the memory. -
+
By default, the `dtype` of an array created in such a way is [`float64`](https://numpy.org/doc/stable/reference/arrays.scalars.html?highlight=float64#numpy.float64), but it can be specified otherwise with the keyword argument `dtype`. -
+ ```python a = np.zeros((3, 4)) diff --git a/NumPy/Array Indexing and Slicing/Indexing Basics/task.md b/NumPy/Array Indexing and Slicing/Indexing Basics/task.md index 9da37db..94fd8de 100644 --- a/NumPy/Array Indexing and Slicing/Indexing Basics/task.md +++ b/NumPy/Array Indexing and Slicing/Indexing Basics/task.md @@ -37,7 +37,7 @@ Basic slicing occurs when obj is a slice object (constructed by `start:stop:step of brackets), an integer, or a tuple of slice objects and integers. All arrays generated by basic slicing are always [views](https://numpy.org/doc/stable/glossary.html#term-view) of the original array. -
+
NumPy slicing creates a view instead of a copy as in the case of built-in Python sequences such as string, tuple, and list. Care must be taken when extracting a @@ -45,7 +45,7 @@ small portion from a large array that becomes useless after the extraction because the small portion extracted contains a reference to the large original array, whose memory will not be released until all arrays derived from it are garbage-collected. In such cases, an explicit `copy()` is recommended. -
+ 1-D array: ```python diff --git a/NumPy/Array Math/Linear Algebra/task.md b/NumPy/Array Math/Linear Algebra/task.md index 4d9ae15..2aaa86c 100644 --- a/NumPy/Array Math/Linear Algebra/task.md +++ b/NumPy/Array Math/Linear Algebra/task.md @@ -38,7 +38,7 @@ Output: [ 0 40]] ``` -
+
There's also the [`numpy.matmul(a, b)`](https://numpy.org/doc/stable/reference/generated/numpy.matmul.html) function (shorthand: `@`). `matmul` differs from `dot` in two important ways: @@ -57,7 +57,7 @@ Output: [[ 0 20] [ 0 40]] ``` -
+ Matrix multiplication is arguably the most important and widely used operation in machine learning. It is used in linear regression, various kinds of neural networks, and other approaches. diff --git a/NumPy/Transposing Sorting Concatenating/Sort/task.md b/NumPy/Transposing Sorting Concatenating/Sort/task.md index edf7637..e55d97c 100644 --- a/NumPy/Transposing Sorting Concatenating/Sort/task.md +++ b/NumPy/Transposing Sorting Concatenating/Sort/task.md @@ -5,12 +5,12 @@ and [`numpy.ndarray.sort`](https://numpy.org/doc/stable/reference/generated/nump the only difference being that the former returns a sorted copy of an array, while the latter is used to sort in-place. -
+
Various sorting algorithms can be used with these methods (see the documentation); they differ in their average speed, worst-case performance, work space size, and stability. The default is [quicksort](https://en.wikipedia.org/wiki/Quicksort). -
+ ```python a = np.array([[1, 4], [3, 1]])