Skip to content

Commit 957fc28

Browse files
committed
Making sure MonitorData.normalize doesn't change the data type
1 parent 7a4b952 commit 957fc28

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tidy3d/components/data/monitor_data.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ def normalize(self, source_spectrum_fn: Callable[[float], complex]) -> FieldData
272272
fields_norm = {}
273273
for field_name, field_data in self.field_components.items():
274274
src_amps = source_spectrum_fn(field_data.f)
275-
fields_norm[field_name] = field_data / src_amps
275+
fields_norm[field_name] = (field_data / src_amps).astype(field_data.dtype)
276276

277277
return self.copy(update=fields_norm)
278278

0 commit comments

Comments
 (0)