From a38011cf28ecb06a652fae4b69a2496e50c0d1c4 Mon Sep 17 00:00:00 2001 From: madvid Date: Sun, 21 Aug 2022 20:17:45 +0200 Subject: [PATCH] enhancement (python3 - gray filter): using kwargs explicitly. --- module03/subject/en.subject.tex | 5 +++-- version | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/module03/subject/en.subject.tex b/module03/subject/en.subject.tex index 26dd7b8..e11ff2d 100644 --- a/module03/subject/en.subject.tex +++ b/module03/subject/en.subject.tex @@ -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. @@ -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!] diff --git a/version b/version index 6c8dc7e..66cfae5 100644 --- a/version +++ b/version @@ -1 +1 @@ -v3.1.0 +v3.1.3