Message from Python discussions
— Take a peek, guys
Guys a problem in writing an array and a list to a txt file using numpy.savetxt
'tt' is a list and
'yf_abso' is a numpy.ndarray
when we put each of them alone, as argument for numpy.savetxt, it is working and the contents are written to the txt file... but when I put them together I'm getting an error as follows
TypeError :Mismatch between array dtype ('|S32') and format specifier ('%.18e %. 18e')
how can we fix this? I just need to write the contents of the list and the array to txt file, with the first column as tt and second column as fft_abso.
— What is funky is your indentation
— Nop use readline() instead,, dont misuse threads😃
— Readline() is ancient. just iterate over the handle.
— How can i handle multiple websockets and save them open for long time?
Im using websockets library.
— I still use it though
— As for memoization, cachetools worked great for me
From functools import lrucache
Use it as a decorator,,, it helps in memoization and its easier actually
— But if your function isn't an expensive function then no need of using lrucache