syntax error in unchanged cell (matplotlib?)

syntax error in unchanged cell (matplotlib?)

by Paul Emile Jean Juillard -
Number of replies: 2

Hello,

I tried to get back onto this week's exercises but rerunning all cells I got a Syntax Error in cell 3 (counting only cells with code).

File "<ipython-input-3-a5de7e5b7ca6>", line 7
    plt.title(f"Annotated set ({len(labels_annotated)} examples)")
                                                                ^
SyntaxError: invalid syntax

I checked that I have the same three cells as the extracted version of the file.
My guess is it comes from matplotlib import.
Verified my packages and reinstalled both numpy and matplotlib. Python version is 3.6.7.

If anyone has run into the same problem...
Paul Juillard



In reply to Paul Emile Jean Juillard

Re: syntax error in unchanged cell (matplotlib?)

by Róger Bermúdez Chacón -

With python 3.6 and above this shouldn't give you problems.
Does this work? 
plt.title("Annotated set ({} examples)".format(len(labels_annotated)))