Skip to content

Commit

Permalink
enhancement (python3 - gray filter): using kwargs explicitly.
Browse files Browse the repository at this point in the history
  • Loading branch information
madvid committed Aug 21, 2022
1 parent 24d18a5 commit a38011c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions module03/subject/en.subject.tex
Original file line number Diff line number Diff line change
Expand Up @@ -668,8 +668,9 @@ \section*{Instructions}
-----
array: numpy.ndarray corresponding to the image.
filter: string with accepted values in ['m','mean','w','weight']
weights: [kwargs] list of 3 floats where the sum equals to 1,
weights: [kwargs] 3 floats where the sum equals to 1,
corresponding to the weights of each RBG channels.
expecting keys: 'r_weight', 'g_weight' and 'b_weight'.
Return:
-------
array: numpy.ndarray corresponding to the transformed image.
Expand Down Expand Up @@ -739,7 +740,7 @@ \section*{Examples}

cf.to_grayscale(arr, 'm')

cf.to_grayscale(arr, 'weight', weights = [0.2, 0.3, 0.5])
cf.to_grayscale(arr, 'weight', r_weight=0.2, 'g_weight'=0.3, 'b_weight'=0.5)
\end{minted}

\begin{figure}[h!]
Expand Down
2 changes: 1 addition & 1 deletion version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v3.1.0
v3.1.3

0 comments on commit a38011c

Please sign in to comment.