np.prod(()) is 1.0 (float), casting is therefore needed

This commit is contained in:
Martin Diehl 2020-01-20 16:05:07 +01:00
parent e3d35b41b4
commit 74927d9622
1 changed files with 1 additions and 1 deletions

View File

@ -219,7 +219,7 @@ class Table():
self.__add_comment(label,data.shape[1:],info) self.__add_comment(label,data.shape[1:],info)
self.shapes[label] = data.shape[1:] if len(data.shape) > 1 else (1,) self.shapes[label] = data.shape[1:] if len(data.shape) > 1 else (1,)
size = np.prod(data.shape[1:]) size = np.prod(data.shape[1:],dtype=int)
new = pd.DataFrame(data=data.reshape(-1,size), new = pd.DataFrame(data=data.reshape(-1,size),
columns=[label]*size, columns=[label]*size,
) )