diff --git a/README.md b/README.md index 481d20f..71a6235 100644 --- a/README.md +++ b/README.md @@ -1956,7 +1956,7 @@ Bytes ```python = bytes() # Ints must be in range from 0 to 255. = bytes(, 'utf-8') # Or: .encode('utf-8') - = .to_bytes(n_bytes, …) # `byteorder='little/big', signed=False`. + = .to_bytes(n_bytes, …) # `byteorder='big/little', signed=False`. = bytes.fromhex('') # Hex pairs can be separated by whitespaces. ``` @@ -1964,7 +1964,7 @@ Bytes ```python = list() # Returns ints in range from 0 to 255. = str(, 'utf-8') # Or: .decode('utf-8') - = int.from_bytes(, …) # `byteorder='little/big', signed=False`. + = int.from_bytes(, …) # `byteorder='big/little', signed=False`. '' = .hex() # Returns hex pairs. Accepts `sep=`. ``` @@ -2064,7 +2064,7 @@ Memory View ```python = list() # Returns a list of ints or floats. = str(, 'utf-8') # Treats mview as a bytes object. - = int.from_bytes(, …) # `byteorder='little/big', signed=False`. + = int.from_bytes(, …) # `byteorder='big/little', signed=False`. '' = .hex() # Treats mview as a bytes object. ``` @@ -2658,7 +2658,7 @@ import numpy as np * **Shape is a tuple of dimension sizes. A 100x50 RGB image has shape (50, 100, 3).** * **Axis is an index of the dimension that gets aggregated. Leftmost dimension has index 0. Summing the RGB image along axis 2 will return a greyscale image with shape (50, 100).** -* **Passing a tuple of axes will chain the operations like this: `'.(axis_1, keepdims=True).(axis_2).squeeze()'`.** +* **Passing a tuple of axes will chain the operations like this: `'.(axis_1).(axis_2 - 1 if axis_2 > axis_1 else axis_2)'`.** ### Indexing ```bash @@ -3236,7 +3236,7 @@ b 3 4 ```python = .set_index(column_key) # Replaces row keys with values from a column. - = .reset_index(drop=False) # Moves row keys to a column named index. + = .reset_index(drop=False) # Drops or moves row keys to column named index. = .sort_index(ascending=True) # Sorts rows by row keys. Use `axis=1` for cols. = .sort_values(column_key/s) # Sorts rows by the passed column/s. Same. ``` diff --git a/index.html b/index.html index 9718977..6655ce6 100644 --- a/index.html +++ b/index.html @@ -54,7 +54,7 @@
- +
@@ -1624,13 +1624,13 @@ CompletedProcess(args=['bc', Encode
<bytes> = bytes(<coll_of_ints>)             # Ints must be in range from 0 to 255.
 <bytes> = bytes(<str>, 'utf-8')             # Or: <str>.encode('utf-8')
-<bytes> = <int>.to_bytes(n_bytes, …)        # `byteorder='little/big', signed=False`.
+<bytes> = <int>.to_bytes(n_bytes, …)        # `byteorder='big/little', signed=False`.
 <bytes> = bytes.fromhex('<hex>')            # Hex pairs can be separated by whitespaces.
 

Decode

<list>  = list(<bytes>)                     # Returns ints in range from 0 to 255.
 <str>   = str(<bytes>, 'utf-8')             # Or: <bytes>.decode('utf-8')
-<int>   = int.from_bytes(<bytes>, …)        # `byteorder='little/big', signed=False`.
+<int>   = int.from_bytes(<bytes>, …)        # `byteorder='big/little', signed=False`.
 '<hex>' = <bytes>.hex()                     # Returns hex pairs. Accepts `sep=<str>`.
 
@@ -1714,7 +1714,7 @@ CompletedProcess(args=['bc', <list> = list(<mview>) # Returns a list of ints or floats. <str> = str(<mview>, 'utf-8') # Treats mview as a bytes object. -<int> = int.from_bytes(<mview>, …) # `byteorder='little/big', signed=False`. +<int> = int.from_bytes(<mview>, …) # `byteorder='big/little', signed=False`. '<hex>' = <mview>.hex() # Treats mview as a bytes object.

#Deque

A thread-safe list with efficient appends and pops from either side. Pronounced "deck".

from collections import deque
@@ -2176,7 +2176,7 @@ drawer = cg.output.GraphvizOutput(output_file=filename)
 
  • Shape is a tuple of dimension sizes. A 100x50 RGB image has shape (50, 100, 3).
  • Axis is an index of the dimension that gets aggregated. Leftmost dimension has index 0. Summing the RGB image along axis 2 will return a greyscale image with shape (50, 100).
  • -
  • Passing a tuple of axes will chain the operations like this: '<array>.<method>(axis_1, keepdims=True).<method>(axis_2).squeeze()'.
  • +
  • Passing a tuple of axes will chain the operations like this: '<array>.<method>(axis_1).<method>(axis_2 - 1 if axis_2 > axis_1 else axis_2)'.

Indexing

<el>       = <2d_array>[row_index, column_index]        # <3d_a>[table_i, row_i, column_i]
 <1d_view>  = <2d_array>[row_index]                      # <3d_a>[table_i, row_i]
@@ -2637,7 +2637,7 @@ b  3  4
 <DF>    = <DF> +-*/ <el/Sr/DF>                 # Items with non-matching keys get value NaN.
 
<DF>    = <DF>.set_index(column_key)           # Replaces row keys with values from a column.
-<DF>    = <DF>.reset_index(drop=False)         # Moves row keys to a column named index.
+<DF>    = <DF>.reset_index(drop=False)         # Drops or moves row keys to column named index.
 <DF>    = <DF>.sort_index(ascending=True)      # Sorts rows by row keys. Use `axis=1` for cols.
 <DF>    = <DF>.sort_values(column_key/s)       # Sorts rows by the passed column/s. Same.
 
@@ -2920,7 +2920,7 @@ $ pyinstaller script.py --add-data '<path>:.'