Skip to content

Commit 315d3bd

Browse files
authored
Merge pull request #250 from 42-AI/240-python03-ex03
module03 - using kwargs explicitly.
2 parents 3ab4ee6 + fd439c8 commit 315d3bd

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

module03/subject/en.subject.tex

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -668,8 +668,9 @@ \section*{Instructions}
668668
-----
669669
array: numpy.ndarray corresponding to the image.
670670
filter: string with accepted values in ['m','mean','w','weight']
671-
weights: [kwargs] list of 3 floats where the sum equals to 1,
671+
weights: [kwargs] 3 floats where the sum equals to 1,
672672
corresponding to the weights of each RBG channels.
673+
expecting keys: 'r_weight', 'g_weight' and 'b_weight'.
673674
Return:
674675
-------
675676
array: numpy.ndarray corresponding to the transformed image.
@@ -739,7 +740,7 @@ \section*{Examples}
739740

740741
cf.to_grayscale(arr, 'm')
741742

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

745746
\begin{figure}[h!]

version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v3.1.1
1+
v3.1.3

0 commit comments

Comments
 (0)