Unterhaltung
Nachrichten
-
To marshal a numpy array with ints as tuple, use tuple(int(i) for i in arr), otherwise the tuple will contain numpy ints! !python
Tuesday, 18-Feb-14 12:20:40 UTC von web-
If you want to use that tuple in a call to exec(), you need tuple([int(i) for i in arr]) to escape delayed evaluation !python
-
Fixed the last errors in my caching layer: Performance increased by factor 5, memory consumption down from 2GiB to 400MiB !python
-
And only cache what I actually use, not what I retrieve. Another 5x performance improvement. I’m back at 10s per plot! !python
-
Hint: don’t use exec() except in cases where it is really, *really*, REALLY useful. See http://sn.1w6.org/notice/47001 !python
-