From 93c8c91619f6b7056aba7c025709e3012c50549e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= Date: Mon, 16 Jan 2023 15:33:34 +0100 Subject: [PATCH] Formatting, NumPy --- README.md | 4 ++-- index.html | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 71a6235..92f4e41 100644 --- a/README.md +++ b/README.md @@ -393,7 +393,7 @@ Format ```python = f'{}, {}' # Curly brackets can also contain expressions. = '{}, {}'.format(, ) # Or: '{0}, {a}'.format(, a=) - = '%s, %s' % (, ) # Redundant and inferior C style formatting. + = '%s, %s' % (, ) # Redundant and inferior C-style formatting. ``` ### Attributes @@ -2638,7 +2638,7 @@ import numpy as np ``` ```python - = np.array() # Returns 1d/2d NumPy array. + = np.array() # Returns a 1d/2d NumPy array. = np.zeros/ones() # Also np.full(, ). = np.arange(from_inc, to_exc, ±step) # Also np.linspace(start, stop, num). = np.random.randint(from_inc, to_exc, ) # Also np.random.random(). diff --git a/index.html b/index.html index 6655ce6..6d2275a 100644 --- a/index.html +++ b/index.html @@ -366,7 +366,7 @@ Point(x=1, y=2

#Format

<str> = f'{<el_1>}, {<el_2>}'            # Curly brackets can also contain expressions.
 <str> = '{}, {}'.format(<el_1>, <el_2>)  # Or: '{0}, {a}'.format(<el_1>, a=<el_2>)
-<str> = '%s, %s' % (<el_1>, <el_2>)      # Redundant and inferior C style formatting.
+<str> = '%s, %s' % (<el_1>, <el_2>)      # Redundant and inferior C-style formatting.
 

Attributes

>>> Person = collections.namedtuple('Person', 'name height')
@@ -2160,7 +2160,7 @@ drawer = cg.output.GraphvizOutput(output_file=filename)
 
-
<array> = np.array(<list/list_of_lists>)                # Returns 1d/2d NumPy array.
+
<array> = np.array(<list/list_of_lists>)                # Returns a 1d/2d NumPy array.
 <array> = np.zeros/ones(<shape>)                        # Also np.full(<shape>, <el>).
 <array> = np.arange(from_inc, to_exc, ±step)            # Also np.linspace(start, stop, num).
 <array> = np.random.randint(from_inc, to_exc, <shape>)  # Also np.random.random(<shape>).