@@ -283,6 +283,8 @@ \section*{Instructions}
283283 \item \texttt {display(array) }: takes a numpy array as an argument and displays the corresponding RGB image.
284284\end {itemize }
285285
286+ You must handle errors, if the file passed as argument does not exist or if it can't be read as an image, with an appropriate message of your choice.
287+
286288\hint {You can use the library of your choice for this exercise,
287289but converting the image to a numpy array is mandatory.
288290The goal of this exercise is to dispense with the technicality of loading and displaying images,
@@ -510,7 +512,7 @@ \section*{Examples}
510512% --------------------------------- %
511513\begin {minted }[bgcolor=darcula-back,formatcom=\color {lightgrey},fontsize=\scriptsize ]{python}
512514import numpy as np
513- from Scrapbooker import ScrapBooker
515+ from ScrapBooker import ScrapBooker
514516
515517spb = ScrapBooker()
516518arr1 = np.arange(0,25).reshape(5,5)
@@ -736,7 +738,7 @@ \section*{Examples}
736738
737739cf.to_grayscale(arr, 'm' )
738740
739- cf.to_grayscale(arr, 'weighted' , [0.2, 0.3, 0.5])
741+ cf.to_grayscale(arr, 'weight' , weights = [0.2, 0.3, 0.5])
740742\end {minted }
741743
742744\begin {figure }[h!]
0 commit comments