Posts

Showing posts with the label jupyter-notebook

invalid index to scalar variable when executing following code

Consider following code: When executing I have following error: IndexError: invalid index to scalar variable. How can I prevent this error? A is of shape (10,103) and the content of A is: To clarify a bit, when all_values[0] = 0 I need the first record of A, when all_values[0] = 1 then I need the second record of A, ..., when all_values[0] = 9 then I need the tenth record of A! By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

matplotlib trying to kill me [on hold]

enter image description here hey and thanks for helping I am trying to plot something. and that's what I got. I used pip install matplotlib in anaconda and I imported this import seaborn as sns import matplotlib.pyplot as plt from matplotlib import style %matplotlib inline The question is : what should i do to get a good plot? As you can see all i got is empty plot without graph. thanks, everyone for helping Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question. your mistake is in plot command: you should do like this: