Error encountered when slicing NumPy array in pyscript #545
Unanswered
stigkildegaard
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I have just started learning pyscript (and Python) and I have encountered a problem when I try to slice an array created with NumPy using the hass pyscript kernel in a Jupyter Notebook. I cannot figure out what the problem is and I would greatly appreciate if someone could point me in the right direction so that I can learn what I am doing wrong.
When the example code below is run using the "Python 3 (ipykernel)" in a Jupyter Notebook that contains nothing else than the example code, it produces the output "[0 1 2 3]", i.e., the first row of the array.
But when I try to run the same example, where the 4th line is changed to use log.info, with the "hass pyscript" kernel, I get the following error:
Thank you in advance for any feedback.
Best regards,
Stig
Beta Was this translation helpful? Give feedback.
All reactions