-
Notifications
You must be signed in to change notification settings - Fork 58
Problems with NP Arrays #221
-
Hi there!
Recently i wanted to create pngs with pyscript to be able to display them on an epaper display. This requires data from the HA, which I store in an np.array. this is where the error occurs during processing:
new_array=time_array>time_treshold
ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
This does not occur when I run python locally. Pyscript is somehow unable to handle the datatype correcly.
new_array should be an logic array. The input time_array contains a list of 2021年06月26日T14:52:07.487Z
as dates
time_threshold contains : datetime.datetime(2021, 6, 27, 11, 22, 49, 382875, tzinfo=<DstTzInfo 'Europe/Berlin' CEST+2:00:00 DST>)
probably this could have something to do with different versions of python...
Beta Was this translation helpful? Give feedback.
All reactions
works with another library
Replies: 1 comment
-
works with another library
Beta Was this translation helpful? Give feedback.