lkilcher / dolfyn

A library for oceanographic doppler instruments such as Acoustic Doppler Profilers (ADPs, ADCPs) and Acoustic Doppler Velocimeters (ADVs).
BSD 3-Clause "New" or "Revised" License
42 stars 25 forks source link

ValueError: illegal value in 4-th argument of internal None #5

Closed lkilcher closed 8 years ago

lkilcher commented 8 years ago

This issue was indicated to me by a colleague who was trying to call the dolfyn.adv.turbulence.calc_turbulence function. Here is the image she sent me of the stack trace: image001

As I was investigating this issue on my machine I was getting the following warning everytime I called scipy.signal.detrend:

/Library/Python/2.7/site-packages/scipy/linalg/basic.py:884: RuntimeWarning: internal gelsd driver 
lwork query error, required iwork dimension not returned. This is likely the result of LAPACK bug 0038,
fixed in LAPACK 3.2.2 (released July 21, 2010). Falling back to 'gelss' driver.

I haven't exactly fixed this issue for either of us yet, but I thought I'd note it here...

lkilcher commented 8 years ago

It turns out this error arose because my colleague was passing empty data objects to the averaging routines, and linalg was being given an empty array. This was resolved in 8a2c0333c9a5204548a844e7694803077b64c7f1 by prohibiting empty data objects from being passed to the averaging tools, and by prohibiting their creation.