mirror of
https://forgemia.inra.fr/theophile.terraz/acoused.git
synced 2026-10-29 19:10:40 +01:00
SQL: Fix crash at reshape failed with try catch (dirty).
This commit is contained in:
1 parent
79ee1c3cfa
commit
9857615a12
1 file changed
+11
-3
@@ -434,10 +434,18 @@ class ReadTableForOpen:
|
||||
for dest, resh in SNR_vars:
|
||||
SNR = np_f64_parse(next(it))
|
||||
|
||||
if len(SNR) == 0:
|
||||
try:
|
||||
if len(SNR) != 0:
|
||||
dest.append(SNR.reshape(resh[i].shape))
|
||||
else:
|
||||
dest.append(np.array([]))
|
||||
except:
|
||||
logger.warning(
|
||||
"SQL: read_table_BS_raw_data_SNR: "
|
||||
+ "failed to reshape data from "
|
||||
+ f"{SNR.shape} to {resh[i].shape}"
|
||||
)
|
||||
dest.append(np.array([]))
|
||||
else:
|
||||
dest.append(SNR.reshape(resh[i].shape))
|
||||
|
||||
def read_table_BS_raw_data_rest(self, query, i):
|
||||
np_f64_parse = lambda d: np.frombuffer(d, dtype=np.float64)
|
||||
|
||||
Reference in new issue
Block a user