mtspec
mtspec copied to clipboard
tinvit error -2
Hello, getting an error called "tinvit error -2" and kicks me out of python3.
Can't find much about it anywhere, any one come across this before?
What platform are you running on? tinvit
is a lapack function and mtspec
does not directly link against lapack. scipy
does though, so maybe something is wrong with your scipy installation? This is just a very uneducated guess...
uneducated guess
wow, that's even worse than an educated guess ;-P
It is certainly an issue with mtspec, as I have isolated it the problem.
I'm experiencing the same issue with: mtspec.mtspec(data=[2, 0, 10, 2, 1, 3, 0, 0, 6, 1, 42, 120, 14, 10, 4], delta=1, time_bandwidth=2, number_of_tapers=4, nfft=1024)
Thank you ncrnalab. Mine is this : band_width = 2.5 k = int(2*band_width - 1) mtspec(in_data, sample_rate, band_width, number_of_tapers=k, quadratic=False, adaptive=True)
in_data, sample_rate are nothing too crazy, but working for ... 99% of the time with the same type of data,
Okay, I have narrowed it done. Something a bit stupid on my part was letting through small data lengths, and that crashes the whole thing with no warning. Looks somewhere in the Fotran code documented on these pages:
https://ocefpaf.github.io/python4oceanographers/blog/2015/01/26/fortran/
http://physics.bk.psu.edu/codes/eiggen.f
There's also a C implementation that might be nicer. I don't know much about this stuff: http://oalib.hlsresearch.com/Modes/Krak_mat/trivec.c
But yeah, for me I got around it by not passing small data lengths but exactly why, I don't know.