Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def loadData(self):
"""
Overloaded loadData function - updates the unstructured grid object
"""
Spatial.loadData(self)
if self.is3D:
self.data=np.ravel(self.data[self.mask3D])
else:
self.data=np.ravel(self.data)
self.ug.cell_data.scalars = self.data
self.ug.cell_data.scalars.name = 'suntans_scalar'
self.ug.modified()