casting to plain array works only (and makes sense only) for a derived
type
This commit is contained in:
Martin Diehl 2019-11-24 11:18:41 +01:00
parent 6060abb375
commit 02df55b9bd
1 changed files with 5 additions and 2 deletions

View File

@ -402,7 +402,10 @@ class DADF5():
a=a.reshape([a.shape[0],1]) a=a.reshape([a.shape[0],1])
dataset[p,:] = a[u,:] dataset[p,:] = a[u,:]
return dataset if not plain else dataset.view(('float64',len(dataset.dtype.names))) if plain and dataset.dtype.names is not None:
return dataset.view(('float64',len(dataset.dtype.names)))
else:
return dataset
def cell_coordinates(self): def cell_coordinates(self):